<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-comment">{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998

\section[Name]{@Name@: to transmit name info from renamer to typechecker}
-}</span><span>
</span><span id="line-7"></span><span>
</span><span id="line-8"></span><span class="hs-pragma">{-# LANGUAGE RecordWildCards #-}</span><span>
</span><span id="line-9"></span><span class="hs-pragma">{-# LANGUAGE TypeFamilies #-}</span><span>
</span><span id="line-10"></span><span class="hs-pragma">{-# LANGUAGE FlexibleInstances #-}</span><span>
</span><span id="line-11"></span><span class="hs-pragma">{-# LANGUAGE PatternSynonyms #-}</span><span>
</span><span id="line-12"></span><span>
</span><span id="line-13"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-14"></span><span class="hs-comment">-- #name_types#</span><span>
</span><span id="line-15"></span><span class="hs-comment">-- GHC uses several kinds of name internally:</span><span>
</span><span id="line-16"></span><span class="hs-comment">--</span><span>
</span><span id="line-17"></span><span class="hs-comment">-- * 'GHC.Types.Name.Occurrence.OccName': see &quot;GHC.Types.Name.Occurrence#name_types&quot;</span><span>
</span><span id="line-18"></span><span class="hs-comment">--</span><span>
</span><span id="line-19"></span><span class="hs-comment">-- * 'GHC.Types.Name.Reader.RdrName': see &quot;GHC.Types.Name.Reader#name_types&quot;</span><span>
</span><span id="line-20"></span><span class="hs-comment">--</span><span>
</span><span id="line-21"></span><span class="hs-comment">-- * 'GHC.Types.Name.Name' is the type of names that have had their scoping and</span><span>
</span><span id="line-22"></span><span class="hs-comment">--   binding resolved. They have an 'OccName' but also a 'GHC.Types.Unique.Unique'</span><span>
</span><span id="line-23"></span><span class="hs-comment">--   that disambiguates Names that have the same 'OccName' and indeed is used for all</span><span>
</span><span id="line-24"></span><span class="hs-comment">--   'Name' comparison. Names also contain information about where they originated</span><span>
</span><span id="line-25"></span><span class="hs-comment">--   from, see &quot;GHC.Types.Name#name_sorts&quot;</span><span>
</span><span id="line-26"></span><span class="hs-comment">--</span><span>
</span><span id="line-27"></span><span class="hs-comment">-- * 'GHC.Types.Id.Id': see &quot;GHC.Types.Id#name_types&quot;</span><span>
</span><span id="line-28"></span><span class="hs-comment">--</span><span>
</span><span id="line-29"></span><span class="hs-comment">-- * 'GHC.Types.Var.Var': see &quot;GHC.Types.Var#name_types&quot;</span><span>
</span><span id="line-30"></span><span class="hs-comment">--</span><span>
</span><span id="line-31"></span><span class="hs-comment">-- #name_sorts#</span><span>
</span><span id="line-32"></span><span class="hs-comment">-- Names are one of:</span><span>
</span><span id="line-33"></span><span class="hs-comment">--</span><span>
</span><span id="line-34"></span><span class="hs-comment">--  * External, if they name things declared in other modules. Some external</span><span>
</span><span id="line-35"></span><span class="hs-comment">--    Names are wired in, i.e. they name primitives defined in the compiler itself</span><span>
</span><span id="line-36"></span><span class="hs-comment">--</span><span>
</span><span id="line-37"></span><span class="hs-comment">--  * Internal, if they name things in the module being compiled. Some internal</span><span>
</span><span id="line-38"></span><span class="hs-comment">--    Names are system names, if they are names manufactured by the compiler</span><span>
</span><span id="line-39"></span><span>
</span><span id="line-40"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Types.Name</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-41"></span><span>        </span><span class="annot"><span class="hs-comment">-- * The main types</span></span><span>
</span><span id="line-42"></span><span>        </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier">Name</span></a></span><span class="hs-special">,</span><span>                                   </span><span class="hs-comment">-- Abstract</span><span>
</span><span id="line-43"></span><span>        </span><span class="annot"><a href="GHC.Types.Name.html#BuiltInSyntax"><span class="hs-identifier">BuiltInSyntax</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-44"></span><span>
</span><span id="line-45"></span><span>        </span><span class="annot"><span class="hs-comment">-- ** Creating 'Name's</span></span><span>
</span><span id="line-46"></span><span>        </span><span class="annot"><a href="GHC.Types.Name.html#mkSystemName"><span class="hs-identifier">mkSystemName</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#mkSystemNameAt"><span class="hs-identifier">mkSystemNameAt</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-47"></span><span>        </span><span class="annot"><a href="GHC.Types.Name.html#mkInternalName"><span class="hs-identifier">mkInternalName</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#mkClonedInternalName"><span class="hs-identifier">mkClonedInternalName</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#mkDerivedInternalName"><span class="hs-identifier">mkDerivedInternalName</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-48"></span><span>        </span><span class="annot"><a href="GHC.Types.Name.html#mkSystemVarName"><span class="hs-identifier">mkSystemVarName</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#mkSysTvName"><span class="hs-identifier">mkSysTvName</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-49"></span><span>        </span><span class="annot"><a href="GHC.Types.Name.html#mkFCallName"><span class="hs-identifier">mkFCallName</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-50"></span><span>        </span><span class="annot"><a href="GHC.Types.Name.html#mkExternalName"><span class="hs-identifier">mkExternalName</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#mkWiredInName"><span class="hs-identifier">mkWiredInName</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-51"></span><span>
</span><span id="line-52"></span><span>        </span><span class="annot"><span class="hs-comment">-- ** Manipulating and deconstructing 'Name's</span></span><span>
</span><span id="line-53"></span><span>        </span><span class="annot"><a href="GHC.Types.Name.html#nameUnique"><span class="hs-identifier">nameUnique</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#setNameUnique"><span class="hs-identifier">setNameUnique</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-54"></span><span>        </span><span class="annot"><a href="GHC.Types.Name.html#nameOccName"><span class="hs-identifier">nameOccName</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#nameNameSpace"><span class="hs-identifier">nameNameSpace</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#nameModule"><span class="hs-identifier">nameModule</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#nameModule_maybe"><span class="hs-identifier">nameModule_maybe</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-55"></span><span>        </span><span class="annot"><a href="GHC.Types.Name.html#setNameLoc"><span class="hs-identifier">setNameLoc</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-56"></span><span>        </span><span class="annot"><a href="GHC.Types.Name.html#tidyNameOcc"><span class="hs-identifier">tidyNameOcc</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-57"></span><span>        </span><span class="annot"><a href="GHC.Types.Name.html#localiseName"><span class="hs-identifier">localiseName</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-58"></span><span>
</span><span id="line-59"></span><span>        </span><span class="annot"><a href="GHC.Types.Name.html#nameSrcLoc"><span class="hs-identifier">nameSrcLoc</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#nameSrcSpan"><span class="hs-identifier">nameSrcSpan</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#pprNameDefnLoc"><span class="hs-identifier">pprNameDefnLoc</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#pprDefinedAt"><span class="hs-identifier">pprDefinedAt</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-60"></span><span>
</span><span id="line-61"></span><span>        </span><span class="annot"><span class="hs-comment">-- ** Predicates on 'Name's</span></span><span>
</span><span id="line-62"></span><span>        </span><span class="annot"><a href="GHC.Types.Name.html#isSystemName"><span class="hs-identifier">isSystemName</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#isInternalName"><span class="hs-identifier">isInternalName</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#isExternalName"><span class="hs-identifier">isExternalName</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-63"></span><span>        </span><span class="annot"><a href="GHC.Types.Name.html#isTyVarName"><span class="hs-identifier">isTyVarName</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#isTyConName"><span class="hs-identifier">isTyConName</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#isDataConName"><span class="hs-identifier">isDataConName</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-64"></span><span>        </span><span class="annot"><a href="GHC.Types.Name.html#isValName"><span class="hs-identifier">isValName</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#isVarName"><span class="hs-identifier">isVarName</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#isDynLinkName"><span class="hs-identifier">isDynLinkName</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-65"></span><span>        </span><span class="annot"><a href="GHC.Types.Name.html#isWiredInName"><span class="hs-identifier">isWiredInName</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#isWiredIn"><span class="hs-identifier">isWiredIn</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#isBuiltInSyntax"><span class="hs-identifier">isBuiltInSyntax</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-66"></span><span>        </span><span class="annot"><a href="GHC.Types.Name.html#isHoleName"><span class="hs-identifier">isHoleName</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-67"></span><span>        </span><span class="annot"><a href="GHC.Types.Name.html#wiredInNameTyThing_maybe"><span class="hs-identifier">wiredInNameTyThing_maybe</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-68"></span><span>        </span><span class="annot"><a href="GHC.Types.Name.html#nameIsLocalOrFrom"><span class="hs-identifier">nameIsLocalOrFrom</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#nameIsHomePackage"><span class="hs-identifier">nameIsHomePackage</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-69"></span><span>        </span><span class="annot"><a href="GHC.Types.Name.html#nameIsHomePackageImport"><span class="hs-identifier">nameIsHomePackageImport</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#nameIsFromExternalPackage"><span class="hs-identifier">nameIsFromExternalPackage</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-70"></span><span>        </span><span class="annot"><a href="GHC.Types.Name.html#stableNameCmp"><span class="hs-identifier">stableNameCmp</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-71"></span><span>
</span><span id="line-72"></span><span>        </span><span class="annot"><span class="hs-comment">-- * Class 'NamedThing' and overloaded friends</span></span><span>
</span><span id="line-73"></span><span>        </span><span class="annot"><a href="GHC.Types.Name.html#NamedThing"><span class="hs-identifier">NamedThing</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-74"></span><span>        </span><span class="annot"><a href="GHC.Types.Name.html#getSrcLoc"><span class="hs-identifier">getSrcLoc</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#getSrcSpan"><span class="hs-identifier">getSrcSpan</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#getOccString"><span class="hs-identifier">getOccString</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#getOccFS"><span class="hs-identifier">getOccFS</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-75"></span><span>
</span><span id="line-76"></span><span>        </span><span class="annot"><a href="GHC.Types.Name.html#pprInfixName"><span class="hs-identifier">pprInfixName</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#pprPrefixName"><span class="hs-identifier">pprPrefixName</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#pprModulePrefix"><span class="hs-identifier">pprModulePrefix</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#pprNameUnqualified"><span class="hs-identifier">pprNameUnqualified</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-77"></span><span>        </span><span class="annot"><a href="GHC.Types.Name.html#nameStableString"><span class="hs-identifier">nameStableString</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-78"></span><span>
</span><span id="line-79"></span><span>        </span><span class="hs-comment">-- Re-export the OccName stuff</span><span>
</span><span id="line-80"></span><span>        </span><span class="hs-keyword">module</span><span> </span><span class="annot"><a href="GHC.Types.Name.Occurrence.html"><span class="hs-identifier">GHC.Types.Name.Occurrence</span></a></span><span>
</span><span id="line-81"></span><span>    </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-82"></span><span>
</span><span id="line-83"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-84"></span><span>
</span><span id="line-85"></span><span class="hs-keyword">import</span><span> </span><span class="hs-pragma">{-# SOURCE</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html"><span class="hs-identifier">GHC.Core.TyCo.Rep</span></a></span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#TyThing"><span class="hs-identifier">TyThing</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-86"></span><span>
</span><span id="line-87"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#"><span class="hs-identifier">GHC.Platform</span></a></span><span>
</span><span id="line-88"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Name.Occurrence.html"><span class="hs-identifier">GHC.Types.Name.Occurrence</span></a></span><span>
</span><span id="line-89"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Unit.Module.html"><span class="hs-identifier">GHC.Unit.Module</span></a></span><span>
</span><span id="line-90"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html"><span class="hs-identifier">GHC.Types.SrcLoc</span></a></span><span>
</span><span id="line-91"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html"><span class="hs-identifier">GHC.Types.Unique</span></a></span><span>
</span><span id="line-92"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Misc.html"><span class="hs-identifier">GHC.Utils.Misc</span></a></span><span>
</span><span id="line-93"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Data.Maybe.html"><span class="hs-identifier">GHC.Data.Maybe</span></a></span><span>
</span><span id="line-94"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Binary.html"><span class="hs-identifier">GHC.Utils.Binary</span></a></span><span>
</span><span id="line-95"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Data.FastString.html"><span class="hs-identifier">GHC.Data.FastString</span></a></span><span>
</span><span id="line-96"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html"><span class="hs-identifier">GHC.Utils.Outputable</span></a></span><span>
</span><span id="line-97"></span><span>
</span><span id="line-98"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../deepseq/src/Control.DeepSeq.html#"><span class="hs-identifier">Control.DeepSeq</span></a></span><span>
</span><span id="line-99"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Data.html#"><span class="hs-identifier">Data.Data</span></a></span><span>
</span><span id="line-100"></span><span>
</span><span id="line-101"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
\subsection[Name-datatype]{The @Name@ datatype, and name construction}
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-108"></span><span>
</span><span id="line-109"></span><span class="hs-comment">-- | A unique, unambiguous name for something, containing information about where</span><span>
</span><span id="line-110"></span><span class="hs-comment">-- that thing originated.</span><span>
</span><span id="line-111"></span><span class="hs-keyword">data</span><span> </span><span id="Name"><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-var">Name</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="Name"><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-var">Name</span></a></span></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-112"></span><span>                </span><span id="n_sort"><span class="annot"><span class="annottext">Name -&gt; NameSort
</span><a href="GHC.Types.Name.html#n_sort"><span class="hs-identifier hs-var hs-var">n_sort</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#NameSort"><span class="hs-identifier hs-type">NameSort</span></a></span><span class="hs-special">,</span><span>     </span><span class="hs-comment">-- What sort of name it is</span><span>
</span><span id="line-113"></span><span>                </span><span id="n_occ"><span class="annot"><span class="annottext">Name -&gt; OccName
</span><a href="GHC.Types.Name.html#n_occ"><span class="hs-identifier hs-var hs-var">n_occ</span></a></span></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#OccName"><span class="hs-identifier hs-type">OccName</span></a></span><span class="hs-special">,</span><span>     </span><span class="hs-comment">-- Its occurrence name</span><span>
</span><span id="line-114"></span><span>                </span><span id="n_uniq"><span class="annot"><span class="annottext">Name -&gt; Unique
</span><a href="GHC.Types.Name.html#n_uniq"><span class="hs-identifier hs-var hs-var">n_uniq</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-115"></span><span>                </span><span id="n_loc"><span class="annot"><span class="annottext">Name -&gt; SrcSpan
</span><a href="GHC.Types.Name.html#n_loc"><span class="hs-identifier hs-var hs-var">n_loc</span></a></span></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="GHC.Types.SrcLoc.html#SrcSpan"><span class="hs-identifier hs-type">SrcSpan</span></a></span><span>      </span><span class="hs-comment">-- Definition site</span><span>
</span><span id="line-116"></span><span>            </span><span class="hs-special">}</span><span>
</span><span id="line-117"></span><span>
</span><span id="line-118"></span><span class="hs-comment">-- NOTE: we make the n_loc field strict to eliminate some potential</span><span>
</span><span id="line-119"></span><span class="hs-comment">-- (and real!) space leaks, due to the fact that we don't look at</span><span>
</span><span id="line-120"></span><span class="hs-comment">-- the SrcLoc in a Name all that often.</span><span>
</span><span id="line-121"></span><span>
</span><span id="line-122"></span><span class="hs-comment">-- See Note [About the NameSorts]</span><span>
</span><span id="line-123"></span><span class="hs-keyword">data</span><span> </span><span id="NameSort"><span class="annot"><a href="GHC.Types.Name.html#NameSort"><span class="hs-identifier hs-var">NameSort</span></a></span></span><span>
</span><span id="line-124"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="External"><span class="annot"><a href="GHC.Types.Name.html#External"><span class="hs-identifier hs-var">External</span></a></span></span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#Module"><span class="hs-identifier hs-type">Module</span></a></span><span>
</span><span id="line-125"></span><span>
</span><span id="line-126"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="WiredIn"><span class="annot"><a href="GHC.Types.Name.html#WiredIn"><span class="hs-identifier hs-var">WiredIn</span></a></span></span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#Module"><span class="hs-identifier hs-type">Module</span></a></span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#TyThing"><span class="hs-identifier hs-type">TyThing</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.html#BuiltInSyntax"><span class="hs-identifier hs-type">BuiltInSyntax</span></a></span><span>
</span><span id="line-127"></span><span>        </span><span class="hs-comment">-- A variant of External, for wired-in things</span><span>
</span><span id="line-128"></span><span>
</span><span id="line-129"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="Internal"><span class="annot"><a href="GHC.Types.Name.html#Internal"><span class="hs-identifier hs-var">Internal</span></a></span></span><span>            </span><span class="hs-comment">-- A user-defined Id or TyVar</span><span>
</span><span id="line-130"></span><span>                        </span><span class="hs-comment">-- defined in the module being compiled</span><span>
</span><span id="line-131"></span><span>
</span><span id="line-132"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="System"><span class="annot"><a href="GHC.Types.Name.html#System"><span class="hs-identifier hs-var">System</span></a></span></span><span>              </span><span class="hs-comment">-- A system-defined Id or TyVar.  Typically the</span><span>
</span><span id="line-133"></span><span>                        </span><span class="hs-comment">-- OccName is very uninformative (like 's')</span><span>
</span><span id="line-134"></span><span>
</span><span id="line-135"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680801181"><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.html#NameSort"><span class="hs-identifier hs-type">NameSort</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-136"></span><span>  </span><span id="local-6989586621680801179"><span class="annot"><span class="annottext">ppr :: NameSort -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.html#External"><span class="hs-identifier hs-type">External</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;external&quot;</span></span><span>
</span><span id="line-137"></span><span>  </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.html#WiredIn"><span class="hs-identifier hs-type">WiredIn</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">TyThing
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">BuiltInSyntax
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;wired-in&quot;</span></span><span>
</span><span id="line-138"></span><span>  </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span>  </span><span class="annot"><span class="annottext">NameSort
</span><a href="GHC.Types.Name.html#Internal"><span class="hs-identifier hs-var">Internal</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;internal&quot;</span></span><span>
</span><span id="line-139"></span><span>  </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span>  </span><span class="annot"><span class="annottext">NameSort
</span><a href="GHC.Types.Name.html#System"><span class="hs-identifier hs-var">System</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;system&quot;</span></span><span>
</span><span id="line-140"></span><span>
</span><span id="line-141"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="../../deepseq/src/Control.DeepSeq.html#NFData"><span class="hs-identifier hs-type">NFData</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-142"></span><span>  </span><span id="local-6989586621680801171"><span class="annot"><span class="annottext">rnf :: Name -&gt; ()
</span><a href="../../deepseq/src/Control.DeepSeq.html#rnf"><span class="hs-identifier hs-var hs-var hs-var hs-var">rnf</span></a></span></span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span class="hs-special">{</span><span id="local-6989586621680801166"><span id="local-6989586621680801167"><span id="local-6989586621680801168"><span id="local-6989586621680801169"><span class="annot"><span class="annottext">OccName
SrcSpan
Unique
NameSort
n_loc :: SrcSpan
n_uniq :: Unique
n_occ :: OccName
n_sort :: NameSort
n_loc :: Name -&gt; SrcSpan
n_uniq :: Name -&gt; Unique
n_occ :: Name -&gt; OccName
n_sort :: Name -&gt; NameSort
</span><a href="#local-6989586621680801166"><span class="hs-glyph hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">..</span></a></span></span></span></span></span><span class="hs-special">}</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NameSort -&gt; ()
forall a. NFData a =&gt; a -&gt; ()
</span><a href="../../deepseq/src/Control.DeepSeq.html#rnf"><span class="hs-identifier hs-var">rnf</span></a></span><span> </span><span class="annot"><span class="annottext">NameSort
</span><a href="#local-6989586621680801169"><span class="hs-identifier hs-var">n_sort</span></a></span><span>
</span><span id="line-143"></span><span>
</span><span id="line-144"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="../../deepseq/src/Control.DeepSeq.html#NFData"><span class="hs-identifier hs-type">NFData</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.html#NameSort"><span class="hs-identifier hs-type">NameSort</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-145"></span><span>  </span><span id="local-6989586621680801161"><span class="annot"><span class="annottext">rnf :: NameSort -&gt; ()
</span><a href="#local-6989586621680801161"><span class="hs-identifier hs-var hs-var hs-var hs-var">rnf</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.html#External"><span class="hs-identifier hs-type">External</span></a></span><span> </span><span id="local-6989586621680801160"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680801160"><span class="hs-identifier hs-var">m</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Module -&gt; ()
forall a. NFData a =&gt; a -&gt; ()
</span><a href="../../deepseq/src/Control.DeepSeq.html#rnf"><span class="hs-identifier hs-var">rnf</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680801160"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-146"></span><span>  </span><span class="annot"><a href="../../deepseq/src/Control.DeepSeq.html#rnf"><span class="hs-identifier hs-var">rnf</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.html#WiredIn"><span class="hs-identifier hs-type">WiredIn</span></a></span><span> </span><span id="local-6989586621680801159"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680801159"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span id="local-6989586621680801158"><span class="annot"><span class="annottext">TyThing
</span><a href="#local-6989586621680801158"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span id="local-6989586621680801157"><span class="annot"><span class="annottext">BuiltInSyntax
</span><a href="#local-6989586621680801157"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Module -&gt; ()
forall a. NFData a =&gt; a -&gt; ()
</span><a href="../../deepseq/src/Control.DeepSeq.html#rnf"><span class="hs-identifier hs-var">rnf</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680801159"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">() -&gt; () -&gt; ()
</span><span class="hs-operator hs-var">`seq`</span></span><span> </span><span class="annot"><span class="annottext">TyThing
</span><a href="#local-6989586621680801158"><span class="hs-identifier hs-var">t</span></a></span><span> </span><span class="annot"><span class="annottext">TyThing -&gt; () -&gt; ()
</span><span class="hs-operator hs-var">`seq`</span></span><span> </span><span class="annot"><span class="annottext">BuiltInSyntax
</span><a href="#local-6989586621680801157"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">BuiltInSyntax -&gt; () -&gt; ()
</span><span class="hs-operator hs-var">`seq`</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-147"></span><span>    </span><span class="hs-comment">-- XXX this is a *lie*, we're not going to rnf the TyThing, but</span><span>
</span><span id="line-148"></span><span>    </span><span class="hs-comment">-- since the TyThings for WiredIn Names are all static they can't</span><span>
</span><span id="line-149"></span><span>    </span><span class="hs-comment">-- be hiding space leaks or errors.</span><span>
</span><span id="line-150"></span><span>  </span><span class="annot"><a href="../../deepseq/src/Control.DeepSeq.html#rnf"><span class="hs-identifier hs-var">rnf</span></a></span><span> </span><span class="annot"><span class="annottext">NameSort
</span><a href="GHC.Types.Name.html#Internal"><span class="hs-identifier hs-var">Internal</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-151"></span><span>  </span><span class="annot"><a href="../../deepseq/src/Control.DeepSeq.html#rnf"><span class="hs-identifier hs-var">rnf</span></a></span><span> </span><span class="annot"><span class="annottext">NameSort
</span><a href="GHC.Types.Name.html#System"><span class="hs-identifier hs-var">System</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-152"></span><span>
</span><span id="line-153"></span><span class="hs-comment">-- | BuiltInSyntax is for things like @(:)@, @[]@ and tuples,</span><span>
</span><span id="line-154"></span><span class="hs-comment">-- which have special syntactic forms.  They aren't in scope</span><span>
</span><span id="line-155"></span><span class="hs-comment">-- as such.</span><span>
</span><span id="line-156"></span><span class="hs-keyword">data</span><span> </span><span id="BuiltInSyntax"><span class="annot"><a href="GHC.Types.Name.html#BuiltInSyntax"><span class="hs-identifier hs-var">BuiltInSyntax</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="BuiltInSyntax"><span class="annot"><a href="GHC.Types.Name.html#BuiltInSyntax"><span class="hs-identifier hs-var">BuiltInSyntax</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="UserSyntax"><span class="annot"><a href="GHC.Types.Name.html#UserSyntax"><span class="hs-identifier hs-var">UserSyntax</span></a></span></span><span>
</span><span id="line-157"></span><span>
</span><span id="line-158"></span><span class="hs-comment">{-
Note [About the NameSorts]

1.  Initially, top-level Ids (including locally-defined ones) get External names,
    and all other local Ids get Internal names

2.  In any invocation of GHC, an External Name for &quot;M.x&quot; has one and only one
    unique.  This unique association is ensured via the Name Cache;
    see Note [The Name Cache] in GHC.Iface.Env.

3.  Things with a External name are given C static labels, so they finally
    appear in the .o file's symbol table.  They appear in the symbol table
    in the form M.n.  If originally-local things have this property they
    must be made @External@ first.

4.  In the tidy-core phase, a External that is not visible to an importer
    is changed to Internal, and a Internal that is visible is changed to External

5.  A System Name differs in the following ways:
        a) has unique attached when printing dumps
        b) unifier eliminates sys tyvars in favour of user provs where possible

    Before anything gets printed in interface files or output code, it's
    fed through a 'tidy' processor, which zaps the OccNames to have
    unique names; and converts all sys-locals to user locals
    If any desugarer sys-locals have survived that far, they get changed to
    &quot;ds1&quot;, &quot;ds2&quot;, etc.

Built-in syntax =&gt; It's a syntactic form, not &quot;in scope&quot; (e.g. [])

Wired-in thing  =&gt; The thing (Id, TyCon) is fully known to the compiler,
                   not read from an interface file.
                   E.g. Bool, True, Int, Float, and many others

All built-in syntax is for wired-in things.
-}</span><span>
</span><span id="line-194"></span><span>
</span><span id="line-195"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#HasOccName"><span class="hs-identifier hs-type">HasOccName</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-196"></span><span>  </span><span id="local-6989586621680801151"><span class="annot"><span class="annottext">occName :: Name -&gt; OccName
</span><a href="GHC.Types.Name.Occurrence.html#occName"><span class="hs-identifier hs-var hs-var hs-var hs-var">occName</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; OccName
</span><a href="GHC.Types.Name.html#nameOccName"><span class="hs-identifier hs-var">nameOccName</span></a></span><span>
</span><span id="line-197"></span><span>
</span><span id="line-198"></span><span class="annot"><a href="GHC.Types.Name.html#nameUnique"><span class="hs-identifier hs-type">nameUnique</span></a></span><span>              </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span>
</span><span id="line-199"></span><span class="annot"><a href="GHC.Types.Name.html#nameOccName"><span class="hs-identifier hs-type">nameOccName</span></a></span><span>             </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#OccName"><span class="hs-identifier hs-type">OccName</span></a></span><span>
</span><span id="line-200"></span><span class="annot"><a href="GHC.Types.Name.html#nameNameSpace"><span class="hs-identifier hs-type">nameNameSpace</span></a></span><span>           </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#NameSpace"><span class="hs-identifier hs-type">NameSpace</span></a></span><span>
</span><span id="line-201"></span><span class="annot"><a href="GHC.Types.Name.html#nameModule"><span class="hs-identifier hs-type">nameModule</span></a></span><span>              </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Misc.html#HasDebugCallStack"><span class="hs-identifier hs-type">HasDebugCallStack</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#Module"><span class="hs-identifier hs-type">Module</span></a></span><span>
</span><span id="line-202"></span><span class="annot"><a href="GHC.Types.Name.html#nameSrcLoc"><span class="hs-identifier hs-type">nameSrcLoc</span></a></span><span>              </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#SrcLoc"><span class="hs-identifier hs-type">SrcLoc</span></a></span><span>
</span><span id="line-203"></span><span class="annot"><a href="GHC.Types.Name.html#nameSrcSpan"><span class="hs-identifier hs-type">nameSrcSpan</span></a></span><span>             </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#SrcSpan"><span class="hs-identifier hs-type">SrcSpan</span></a></span><span>
</span><span id="line-204"></span><span>
</span><span id="line-205"></span><span id="nameUnique"><span class="annot"><span class="annottext">nameUnique :: Name -&gt; Unique
</span><a href="GHC.Types.Name.html#nameUnique"><span class="hs-identifier hs-var hs-var">nameUnique</span></a></span></span><span>    </span><span id="local-6989586621680801149"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801149"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Unique
</span><a href="GHC.Types.Name.html#n_uniq"><span class="hs-identifier hs-var hs-var">n_uniq</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801149"><span class="hs-identifier hs-var">name</span></a></span><span>
</span><span id="line-206"></span><span id="nameOccName"><span class="annot"><span class="annottext">nameOccName :: Name -&gt; OccName
</span><a href="GHC.Types.Name.html#nameOccName"><span class="hs-identifier hs-var hs-var">nameOccName</span></a></span></span><span>   </span><span id="local-6989586621680801148"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801148"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; OccName
</span><a href="GHC.Types.Name.html#n_occ"><span class="hs-identifier hs-var hs-var">n_occ</span></a></span><span>  </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801148"><span class="hs-identifier hs-var">name</span></a></span><span>
</span><span id="line-207"></span><span id="nameNameSpace"><span class="annot"><span class="annottext">nameNameSpace :: Name -&gt; NameSpace
</span><a href="GHC.Types.Name.html#nameNameSpace"><span class="hs-identifier hs-var hs-var">nameNameSpace</span></a></span></span><span> </span><span id="local-6989586621680801147"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801147"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OccName -&gt; NameSpace
</span><a href="GHC.Types.Name.Occurrence.html#occNameSpace"><span class="hs-identifier hs-var hs-var">occNameSpace</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; OccName
</span><a href="GHC.Types.Name.html#n_occ"><span class="hs-identifier hs-var hs-var">n_occ</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801147"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-208"></span><span id="nameSrcLoc"><span class="annot"><span class="annottext">nameSrcLoc :: Name -&gt; SrcLoc
</span><a href="GHC.Types.Name.html#nameSrcLoc"><span class="hs-identifier hs-var hs-var">nameSrcLoc</span></a></span></span><span>    </span><span id="local-6989586621680801145"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801145"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SrcSpan -&gt; SrcLoc
</span><a href="GHC.Types.SrcLoc.html#srcSpanStart"><span class="hs-identifier hs-var">srcSpanStart</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; SrcSpan
</span><a href="GHC.Types.Name.html#n_loc"><span class="hs-identifier hs-var hs-var">n_loc</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801145"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-209"></span><span id="nameSrcSpan"><span class="annot"><span class="annottext">nameSrcSpan :: Name -&gt; SrcSpan
</span><a href="GHC.Types.Name.html#nameSrcSpan"><span class="hs-identifier hs-var hs-var">nameSrcSpan</span></a></span></span><span>   </span><span id="local-6989586621680801143"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801143"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; SrcSpan
</span><a href="GHC.Types.Name.html#n_loc"><span class="hs-identifier hs-var hs-var">n_loc</span></a></span><span>  </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801143"><span class="hs-identifier hs-var">name</span></a></span><span>
</span><span id="line-210"></span><span>
</span><span id="line-211"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
\subsection{Predicates on names}
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-218"></span><span>
</span><span id="line-219"></span><span class="annot"><a href="GHC.Types.Name.html#isInternalName"><span class="hs-identifier hs-type">isInternalName</span></a></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-220"></span><span class="annot"><a href="GHC.Types.Name.html#isExternalName"><span class="hs-identifier hs-type">isExternalName</span></a></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-221"></span><span class="annot"><a href="GHC.Types.Name.html#isSystemName"><span class="hs-identifier hs-type">isSystemName</span></a></span><span>      </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-222"></span><span class="annot"><a href="GHC.Types.Name.html#isWiredInName"><span class="hs-identifier hs-type">isWiredInName</span></a></span><span>     </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-223"></span><span>
</span><span id="line-224"></span><span id="isWiredInName"><span class="annot"><span class="annottext">isWiredInName :: Name -&gt; Bool
</span><a href="GHC.Types.Name.html#isWiredInName"><span class="hs-identifier hs-var hs-var">isWiredInName</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-special">{</span><span class="annot"><span class="annottext">n_sort :: Name -&gt; NameSort
</span><a href="GHC.Types.Name.html#n_sort"><span class="hs-identifier hs-var">n_sort</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#WiredIn"><span class="hs-identifier hs-type">WiredIn</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">TyThing
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">BuiltInSyntax
</span><span class="hs-identifier">_</span></span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-225"></span><span class="annot"><a href="GHC.Types.Name.html#isWiredInName"><span class="hs-identifier hs-var">isWiredInName</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><span class="hs-identifier">_</span></span><span>                               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-226"></span><span>
</span><span id="line-227"></span><span id="local-6989586621680801397"><span class="annot"><a href="GHC.Types.Name.html#isWiredIn"><span class="hs-identifier hs-type">isWiredIn</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#NamedThing"><span class="hs-identifier hs-type">NamedThing</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680801397"><span class="hs-identifier hs-type">thing</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680801397"><span class="hs-identifier hs-type">thing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span></span><span>
</span><span id="line-228"></span><span id="isWiredIn"><span class="annot"><span class="annottext">isWiredIn :: forall thing. NamedThing thing =&gt; thing -&gt; Bool
</span><a href="GHC.Types.Name.html#isWiredIn"><span class="hs-identifier hs-var hs-var">isWiredIn</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Bool
</span><a href="GHC.Types.Name.html#isWiredInName"><span class="hs-identifier hs-var">isWiredInName</span></a></span><span> </span><span class="annot"><span class="annottext">(Name -&gt; Bool) -&gt; (thing -&gt; Name) -&gt; thing -&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">thing -&gt; Name
forall a. NamedThing a =&gt; a -&gt; Name
</span><a href="GHC.Types.Name.html#getName"><span class="hs-identifier hs-var">getName</span></a></span><span>
</span><span id="line-229"></span><span>
</span><span id="line-230"></span><span class="annot"><a href="GHC.Types.Name.html#wiredInNameTyThing_maybe"><span class="hs-identifier hs-type">wiredInNameTyThing_maybe</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#TyThing"><span class="hs-identifier hs-type">TyThing</span></a></span><span>
</span><span id="line-231"></span><span id="wiredInNameTyThing_maybe"><span class="annot"><span class="annottext">wiredInNameTyThing_maybe :: Name -&gt; Maybe TyThing
</span><a href="GHC.Types.Name.html#wiredInNameTyThing_maybe"><span class="hs-identifier hs-var hs-var">wiredInNameTyThing_maybe</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-special">{</span><span class="annot"><span class="annottext">n_sort :: Name -&gt; NameSort
</span><a href="GHC.Types.Name.html#n_sort"><span class="hs-identifier hs-var">n_sort</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#WiredIn"><span class="hs-identifier hs-type">WiredIn</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680801138"><span class="annot"><span class="annottext">TyThing
</span><a href="#local-6989586621680801138"><span class="hs-identifier hs-var">thing</span></a></span></span><span> </span><span class="annot"><span class="annottext">BuiltInSyntax
</span><span class="hs-identifier">_</span></span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TyThing -&gt; Maybe TyThing
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">TyThing
</span><a href="#local-6989586621680801138"><span class="hs-identifier hs-var">thing</span></a></span><span>
</span><span id="line-232"></span><span class="annot"><a href="GHC.Types.Name.html#wiredInNameTyThing_maybe"><span class="hs-identifier hs-var">wiredInNameTyThing_maybe</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><span class="hs-identifier">_</span></span><span>                                   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe TyThing
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-233"></span><span>
</span><span id="line-234"></span><span class="annot"><a href="GHC.Types.Name.html#isBuiltInSyntax"><span class="hs-identifier hs-type">isBuiltInSyntax</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-235"></span><span id="isBuiltInSyntax"><span class="annot"><span class="annottext">isBuiltInSyntax :: Name -&gt; Bool
</span><a href="GHC.Types.Name.html#isBuiltInSyntax"><span class="hs-identifier hs-var hs-var">isBuiltInSyntax</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-special">{</span><span class="annot"><span class="annottext">n_sort :: Name -&gt; NameSort
</span><a href="GHC.Types.Name.html#n_sort"><span class="hs-identifier hs-var">n_sort</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#WiredIn"><span class="hs-identifier hs-type">WiredIn</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">TyThing
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">BuiltInSyntax
</span><a href="GHC.Types.Name.html#BuiltInSyntax"><span class="hs-identifier hs-var">BuiltInSyntax</span></a></span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-236"></span><span class="annot"><a href="GHC.Types.Name.html#isBuiltInSyntax"><span class="hs-identifier hs-var">isBuiltInSyntax</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><span class="hs-identifier">_</span></span><span>                                           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-237"></span><span>
</span><span id="line-238"></span><span id="isExternalName"><span class="annot"><span class="annottext">isExternalName :: Name -&gt; Bool
</span><a href="GHC.Types.Name.html#isExternalName"><span class="hs-identifier hs-var hs-var">isExternalName</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-special">{</span><span class="annot"><span class="annottext">n_sort :: Name -&gt; NameSort
</span><a href="GHC.Types.Name.html#n_sort"><span class="hs-identifier hs-var">n_sort</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#External"><span class="hs-identifier hs-type">External</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><span class="hs-identifier">_</span></span><span class="hs-special">}</span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-239"></span><span class="annot"><a href="GHC.Types.Name.html#isExternalName"><span class="hs-identifier hs-var">isExternalName</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-special">{</span><span class="annot"><span class="annottext">n_sort :: Name -&gt; NameSort
</span><a href="GHC.Types.Name.html#n_sort"><span class="hs-identifier hs-var">n_sort</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#WiredIn"><span class="hs-identifier hs-type">WiredIn</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">TyThing
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">BuiltInSyntax
</span><span class="hs-identifier">_</span></span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-240"></span><span class="annot"><a href="GHC.Types.Name.html#isExternalName"><span class="hs-identifier hs-var">isExternalName</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><span class="hs-identifier">_</span></span><span>                               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-241"></span><span>
</span><span id="line-242"></span><span id="isInternalName"><span class="annot"><span class="annottext">isInternalName :: Name -&gt; Bool
</span><a href="GHC.Types.Name.html#isInternalName"><span class="hs-identifier hs-var hs-var">isInternalName</span></a></span></span><span> </span><span id="local-6989586621680801137"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801137"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; Bool
</span><a href="GHC.Types.Name.html#isExternalName"><span class="hs-identifier hs-var">isExternalName</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801137"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-243"></span><span>
</span><span id="line-244"></span><span class="annot"><a href="GHC.Types.Name.html#isHoleName"><span class="hs-identifier hs-type">isHoleName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-245"></span><span id="isHoleName"><span class="annot"><span class="annottext">isHoleName :: Name -&gt; Bool
</span><a href="GHC.Types.Name.html#isHoleName"><span class="hs-identifier hs-var hs-var">isHoleName</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Module -&gt; Bool
forall u. GenModule (GenUnit u) -&gt; Bool
</span><a href="GHC.Unit.Module.html#isHoleModule"><span class="hs-identifier hs-var">isHoleModule</span></a></span><span> </span><span class="annot"><span class="annottext">(Module -&gt; Bool) -&gt; (Name -&gt; Module) -&gt; Name -&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Name -&gt; Module
Name -&gt; Module
</span><a href="GHC.Types.Name.html#nameModule"><span class="hs-identifier hs-var">nameModule</span></a></span><span>
</span><span id="line-246"></span><span>
</span><span id="line-247"></span><span class="hs-comment">-- | Will the 'Name' come from a dynamically linked package?</span><span>
</span><span id="line-248"></span><span class="annot"><a href="GHC.Types.Name.html#isDynLinkName"><span class="hs-identifier hs-type">isDynLinkName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#Module"><span class="hs-identifier hs-type">Module</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-249"></span><span id="isDynLinkName"><span class="annot"><span class="annottext">isDynLinkName :: Platform -&gt; Module -&gt; Name -&gt; Bool
</span><a href="GHC.Types.Name.html#isDynLinkName"><span class="hs-identifier hs-var hs-var">isDynLinkName</span></a></span></span><span> </span><span id="local-6989586621680801134"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680801134"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621680801133"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680801133"><span class="hs-identifier hs-var">this_mod</span></a></span></span><span> </span><span id="local-6989586621680801132"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801132"><span class="hs-identifier hs-var">name</span></a></span></span><span>
</span><span id="line-250"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680801131"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680801131"><span class="hs-identifier hs-var">mod</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Maybe Module
</span><a href="GHC.Types.Name.html#nameModule_maybe"><span class="hs-identifier hs-var">nameModule_maybe</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801132"><span class="hs-identifier hs-var">name</span></a></span><span>
</span><span id="line-251"></span><span>    </span><span class="hs-comment">-- Issue #8696 - when GHC is dynamically linked, it will attempt</span><span>
</span><span id="line-252"></span><span>    </span><span class="hs-comment">-- to load the dynamic dependencies of object files at compile</span><span>
</span><span id="line-253"></span><span>    </span><span class="hs-comment">-- time for things like QuasiQuotes or</span><span>
</span><span id="line-254"></span><span>    </span><span class="hs-comment">-- TemplateHaskell. Unfortunately, this interacts badly with</span><span>
</span><span id="line-255"></span><span>    </span><span class="hs-comment">-- intra-package linking, because we don't generate indirect</span><span>
</span><span id="line-256"></span><span>    </span><span class="hs-comment">-- (dynamic) symbols for intra-package calls. This means that if a</span><span>
</span><span id="line-257"></span><span>    </span><span class="hs-comment">-- module with an intra-package call is loaded without its</span><span>
</span><span id="line-258"></span><span>    </span><span class="hs-comment">-- dependencies, then GHC fails to link.</span><span>
</span><span id="line-259"></span><span>    </span><span class="hs-comment">--</span><span>
</span><span id="line-260"></span><span>    </span><span class="hs-comment">-- In the mean time, always force dynamic indirections to be</span><span>
</span><span id="line-261"></span><span>    </span><span class="hs-comment">-- generated: when the module name isn't the module being</span><span>
</span><span id="line-262"></span><span>    </span><span class="hs-comment">-- compiled, references are dynamic.</span><span>
</span><span id="line-263"></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; OS
</span><a href="../../ghc-boot/src/GHC.Platform.html#platformOS"><span class="hs-identifier hs-var">platformOS</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680801134"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-264"></span><span>        </span><span class="hs-comment">-- On Windows the hack for #8696 makes it unlinkable.</span><span>
</span><span id="line-265"></span><span>        </span><span class="hs-comment">-- As the entire setup of the code from Cmm down to the RTS expects</span><span>
</span><span id="line-266"></span><span>        </span><span class="hs-comment">-- the use of trampolines for the imported functions only when</span><span>
</span><span id="line-267"></span><span>        </span><span class="hs-comment">-- doing intra-package linking, e.g. referring to a symbol defined in the same</span><span>
</span><span id="line-268"></span><span>        </span><span class="hs-comment">-- package should not use a trampoline.</span><span>
</span><span id="line-269"></span><span>        </span><span class="hs-comment">-- I much rather have dynamic TH not supported than the entire Dynamic linking</span><span>
</span><span id="line-270"></span><span>        </span><span class="hs-comment">-- not due to a hack.</span><span>
</span><span id="line-271"></span><span>        </span><span class="hs-comment">-- Also not sure this would break on Windows anyway.</span><span>
</span><span id="line-272"></span><span>        </span><span class="annot"><span class="annottext">OS
</span><a href="../../ghc-boot/src/GHC.Platform.html#OSMinGW32"><span class="hs-identifier hs-var">OSMinGW32</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Module -&gt; Unit
forall unit. GenModule unit -&gt; unit
</span><a href="GHC.Unit.Types.html#moduleUnit"><span class="hs-identifier hs-var hs-var">moduleUnit</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680801131"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="annot"><span class="annottext">Unit -&gt; Unit -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">/=</span></span><span> </span><span class="annot"><span class="annottext">Module -&gt; Unit
forall unit. GenModule unit -&gt; unit
</span><a href="GHC.Unit.Types.html#moduleUnit"><span class="hs-identifier hs-var hs-var">moduleUnit</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680801133"><span class="hs-identifier hs-var">this_mod</span></a></span><span>
</span><span id="line-273"></span><span>
</span><span id="line-274"></span><span>        </span><span class="hs-comment">-- For the other platforms, still perform the hack</span><span>
</span><span id="line-275"></span><span>        </span><span class="annot"><span class="annottext">OS
</span><span class="hs-identifier">_</span></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680801131"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="annot"><span class="annottext">Module -&gt; Module -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">/=</span></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680801133"><span class="hs-identifier hs-var">this_mod</span></a></span><span>
</span><span id="line-276"></span><span>
</span><span id="line-277"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>  </span><span class="hs-comment">-- no, it is not even an external name</span><span>
</span><span id="line-278"></span><span>
</span><span id="line-279"></span><span>
</span><span id="line-280"></span><span id="nameModule"><span class="annot"><span class="annottext">nameModule :: HasDebugCallStack =&gt; Name -&gt; Module
</span><a href="GHC.Types.Name.html#nameModule"><span class="hs-identifier hs-var hs-var">nameModule</span></a></span></span><span> </span><span id="local-6989586621680801121"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801121"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-281"></span><span>  </span><span class="annot"><span class="annottext">Name -&gt; Maybe Module
</span><a href="GHC.Types.Name.html#nameModule_maybe"><span class="hs-identifier hs-var">nameModule_maybe</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801121"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Module -&gt; Module -&gt; Module
forall a. Maybe a -&gt; a -&gt; a
</span><a href="GHC.Data.Maybe.html#orElse"><span class="hs-operator hs-var">`orElse`</span></a></span><span>
</span><span id="line-282"></span><span>  </span><span class="annot"><span class="annottext">String -&gt; SDoc -&gt; Module
forall a. HasCallStack =&gt; String -&gt; SDoc -&gt; a
</span><a href="GHC.Utils.Outputable.html#pprPanic"><span class="hs-identifier hs-var">pprPanic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;nameModule&quot;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NameSort -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; NameSort
</span><a href="GHC.Types.Name.html#n_sort"><span class="hs-identifier hs-var hs-var">n_sort</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801121"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801121"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-283"></span><span>
</span><span id="line-284"></span><span class="annot"><a href="GHC.Types.Name.html#nameModule_maybe"><span class="hs-identifier hs-type">nameModule_maybe</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#Module"><span class="hs-identifier hs-type">Module</span></a></span><span>
</span><span id="line-285"></span><span id="nameModule_maybe"><span class="annot"><span class="annottext">nameModule_maybe :: Name -&gt; Maybe Module
</span><a href="GHC.Types.Name.html#nameModule_maybe"><span class="hs-identifier hs-var hs-var">nameModule_maybe</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">n_sort :: Name -&gt; NameSort
</span><a href="GHC.Types.Name.html#n_sort"><span class="hs-identifier hs-var">n_sort</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#External"><span class="hs-identifier hs-type">External</span></a></span><span> </span><span id="local-6989586621680801117"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680801117"><span class="hs-identifier hs-var">mod</span></a></span></span><span class="hs-special">}</span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Module -&gt; Maybe Module
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680801117"><span class="hs-identifier hs-var">mod</span></a></span><span>
</span><span id="line-286"></span><span class="annot"><a href="GHC.Types.Name.html#nameModule_maybe"><span class="hs-identifier hs-var">nameModule_maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">n_sort :: Name -&gt; NameSort
</span><a href="GHC.Types.Name.html#n_sort"><span class="hs-identifier hs-var">n_sort</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#WiredIn"><span class="hs-identifier hs-type">WiredIn</span></a></span><span> </span><span id="local-6989586621680801116"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680801116"><span class="hs-identifier hs-var">mod</span></a></span></span><span> </span><span class="annot"><span class="annottext">TyThing
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">BuiltInSyntax
</span><span class="hs-identifier">_</span></span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Module -&gt; Maybe Module
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680801116"><span class="hs-identifier hs-var">mod</span></a></span><span>
</span><span id="line-287"></span><span class="annot"><a href="GHC.Types.Name.html#nameModule_maybe"><span class="hs-identifier hs-var">nameModule_maybe</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><span class="hs-identifier">_</span></span><span>                                  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe Module
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-288"></span><span>
</span><span id="line-289"></span><span class="annot"><a href="GHC.Types.Name.html#nameIsLocalOrFrom"><span class="hs-identifier hs-type">nameIsLocalOrFrom</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#Module"><span class="hs-identifier hs-type">Module</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-290"></span><span class="hs-comment">-- ^ Returns True if the name is</span><span>
</span><span id="line-291"></span><span class="hs-comment">--   (a) Internal</span><span>
</span><span id="line-292"></span><span class="hs-comment">--   (b) External but from the specified module</span><span>
</span><span id="line-293"></span><span class="hs-comment">--   (c) External but from the 'interactive' package</span><span>
</span><span id="line-294"></span><span class="hs-comment">--</span><span>
</span><span id="line-295"></span><span class="hs-comment">-- The key idea is that</span><span>
</span><span id="line-296"></span><span class="hs-comment">--    False means: the entity is defined in some other module</span><span>
</span><span id="line-297"></span><span class="hs-comment">--                 you can find the details (type, fixity, instances)</span><span>
</span><span id="line-298"></span><span class="hs-comment">--                     in some interface file</span><span>
</span><span id="line-299"></span><span class="hs-comment">--                 those details will be stored in the EPT or HPT</span><span>
</span><span id="line-300"></span><span class="hs-comment">--</span><span>
</span><span id="line-301"></span><span class="hs-comment">--    True means:  the entity is defined in this module or earlier in</span><span>
</span><span id="line-302"></span><span class="hs-comment">--                     the GHCi session</span><span>
</span><span id="line-303"></span><span class="hs-comment">--                 you can find details (type, fixity, instances) in the</span><span>
</span><span id="line-304"></span><span class="hs-comment">--                     TcGblEnv or TcLclEnv</span><span>
</span><span id="line-305"></span><span class="hs-comment">--</span><span>
</span><span id="line-306"></span><span class="hs-comment">-- The isInteractiveModule part is because successive interactions of a GHCi session</span><span>
</span><span id="line-307"></span><span class="hs-comment">-- each give rise to a fresh module (Ghci1, Ghci2, etc), but they all come</span><span>
</span><span id="line-308"></span><span class="hs-comment">-- from the magic 'interactive' package; and all the details are kept in the</span><span>
</span><span id="line-309"></span><span class="hs-comment">-- TcLclEnv, TcGblEnv, NOT in the HPT or EPT.</span><span>
</span><span id="line-310"></span><span class="hs-comment">-- See Note [The interactive package] in &quot;GHC.Driver.Types&quot;</span><span>
</span><span id="line-311"></span><span>
</span><span id="line-312"></span><span id="nameIsLocalOrFrom"><span class="annot"><span class="annottext">nameIsLocalOrFrom :: Module -&gt; Name -&gt; Bool
</span><a href="GHC.Types.Name.html#nameIsLocalOrFrom"><span class="hs-identifier hs-var hs-var">nameIsLocalOrFrom</span></a></span></span><span> </span><span id="local-6989586621680801115"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680801115"><span class="hs-identifier hs-var">from</span></a></span></span><span> </span><span id="local-6989586621680801114"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801114"><span class="hs-identifier hs-var">name</span></a></span></span><span>
</span><span id="line-313"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680801113"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680801113"><span class="hs-identifier hs-var">mod</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Maybe Module
</span><a href="GHC.Types.Name.html#nameModule_maybe"><span class="hs-identifier hs-var">nameModule_maybe</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801114"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680801115"><span class="hs-identifier hs-var">from</span></a></span><span> </span><span class="annot"><span class="annottext">Module -&gt; Module -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680801113"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">Module -&gt; Bool
</span><a href="GHC.Unit.Types.html#isInteractiveModule"><span class="hs-identifier hs-var">isInteractiveModule</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680801113"><span class="hs-identifier hs-var">mod</span></a></span><span>
</span><span id="line-314"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>                         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-315"></span><span>
</span><span id="line-316"></span><span class="annot"><a href="GHC.Types.Name.html#nameIsHomePackage"><span class="hs-identifier hs-type">nameIsHomePackage</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#Module"><span class="hs-identifier hs-type">Module</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-317"></span><span class="hs-comment">-- True if the Name is defined in module of this package</span><span>
</span><span id="line-318"></span><span id="nameIsHomePackage"><span class="annot"><span class="annottext">nameIsHomePackage :: Module -&gt; Name -&gt; Bool
</span><a href="GHC.Types.Name.html#nameIsHomePackage"><span class="hs-identifier hs-var hs-var">nameIsHomePackage</span></a></span></span><span> </span><span id="local-6989586621680801110"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680801110"><span class="hs-identifier hs-var">this_mod</span></a></span></span><span>
</span><span id="line-319"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621680801109"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801109"><span class="hs-identifier hs-var">nm</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Name -&gt; NameSort
</span><a href="GHC.Types.Name.html#n_sort"><span class="hs-identifier hs-var hs-var">n_sort</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801109"><span class="hs-identifier hs-var">nm</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-320"></span><span>              </span><span class="annot"><a href="GHC.Types.Name.html#External"><span class="hs-identifier hs-type">External</span></a></span><span> </span><span id="local-6989586621680801108"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680801108"><span class="hs-identifier hs-var">nm_mod</span></a></span></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Module -&gt; Unit
forall unit. GenModule unit -&gt; unit
</span><a href="GHC.Unit.Types.html#moduleUnit"><span class="hs-identifier hs-var hs-var">moduleUnit</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680801108"><span class="hs-identifier hs-var">nm_mod</span></a></span><span> </span><span class="annot"><span class="annottext">Unit -&gt; Unit -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Unit
</span><a href="#local-6989586621680801107"><span class="hs-identifier hs-var">this_pkg</span></a></span><span>
</span><span id="line-321"></span><span>              </span><span class="annot"><a href="GHC.Types.Name.html#WiredIn"><span class="hs-identifier hs-type">WiredIn</span></a></span><span> </span><span id="local-6989586621680801106"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680801106"><span class="hs-identifier hs-var">nm_mod</span></a></span></span><span> </span><span class="annot"><span class="annottext">TyThing
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">BuiltInSyntax
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Module -&gt; Unit
forall unit. GenModule unit -&gt; unit
</span><a href="GHC.Unit.Types.html#moduleUnit"><span class="hs-identifier hs-var hs-var">moduleUnit</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680801106"><span class="hs-identifier hs-var">nm_mod</span></a></span><span> </span><span class="annot"><span class="annottext">Unit -&gt; Unit -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Unit
</span><a href="#local-6989586621680801107"><span class="hs-identifier hs-var">this_pkg</span></a></span><span>
</span><span id="line-322"></span><span>              </span><span class="annot"><span class="annottext">NameSort
</span><a href="GHC.Types.Name.html#Internal"><span class="hs-identifier hs-var">Internal</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-323"></span><span>              </span><span class="annot"><span class="annottext">NameSort
</span><a href="GHC.Types.Name.html#System"><span class="hs-identifier hs-var">System</span></a></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-324"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-325"></span><span>    </span><span id="local-6989586621680801107"><span class="annot"><span class="annottext">this_pkg :: Unit
</span><a href="#local-6989586621680801107"><span class="hs-identifier hs-var hs-var">this_pkg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Module -&gt; Unit
forall unit. GenModule unit -&gt; unit
</span><a href="GHC.Unit.Types.html#moduleUnit"><span class="hs-identifier hs-var hs-var">moduleUnit</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680801110"><span class="hs-identifier hs-var">this_mod</span></a></span><span>
</span><span id="line-326"></span><span>
</span><span id="line-327"></span><span class="annot"><a href="GHC.Types.Name.html#nameIsHomePackageImport"><span class="hs-identifier hs-type">nameIsHomePackageImport</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#Module"><span class="hs-identifier hs-type">Module</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-328"></span><span class="hs-comment">-- True if the Name is defined in module of this package</span><span>
</span><span id="line-329"></span><span class="hs-comment">-- /other than/ the this_mod</span><span>
</span><span id="line-330"></span><span id="nameIsHomePackageImport"><span class="annot"><span class="annottext">nameIsHomePackageImport :: Module -&gt; Name -&gt; Bool
</span><a href="GHC.Types.Name.html#nameIsHomePackageImport"><span class="hs-identifier hs-var hs-var">nameIsHomePackageImport</span></a></span></span><span> </span><span id="local-6989586621680801105"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680801105"><span class="hs-identifier hs-var">this_mod</span></a></span></span><span>
</span><span id="line-331"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621680801104"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801104"><span class="hs-identifier hs-var">nm</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Maybe Module
</span><a href="GHC.Types.Name.html#nameModule_maybe"><span class="hs-identifier hs-var">nameModule_maybe</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801104"><span class="hs-identifier hs-var">nm</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-332"></span><span>              </span><span class="annot"><span class="annottext">Maybe Module
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-333"></span><span>              </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680801103"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680801103"><span class="hs-identifier hs-var">nm_mod</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680801103"><span class="hs-identifier hs-var">nm_mod</span></a></span><span> </span><span class="annot"><span class="annottext">Module -&gt; Module -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">/=</span></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680801105"><span class="hs-identifier hs-var">this_mod</span></a></span><span>
</span><span id="line-334"></span><span>                          </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Module -&gt; Unit
forall unit. GenModule unit -&gt; unit
</span><a href="GHC.Unit.Types.html#moduleUnit"><span class="hs-identifier hs-var hs-var">moduleUnit</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680801103"><span class="hs-identifier hs-var">nm_mod</span></a></span><span> </span><span class="annot"><span class="annottext">Unit -&gt; Unit -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Unit
</span><a href="#local-6989586621680801101"><span class="hs-identifier hs-var">this_pkg</span></a></span><span>
</span><span id="line-335"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-336"></span><span>    </span><span id="local-6989586621680801101"><span class="annot"><span class="annottext">this_pkg :: Unit
</span><a href="#local-6989586621680801101"><span class="hs-identifier hs-var hs-var">this_pkg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Module -&gt; Unit
forall unit. GenModule unit -&gt; unit
</span><a href="GHC.Unit.Types.html#moduleUnit"><span class="hs-identifier hs-var hs-var">moduleUnit</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680801105"><span class="hs-identifier hs-var">this_mod</span></a></span><span>
</span><span id="line-337"></span><span>
</span><span id="line-338"></span><span class="hs-comment">-- | Returns True if the Name comes from some other package: neither this</span><span>
</span><span id="line-339"></span><span class="hs-comment">-- package nor the interactive package.</span><span>
</span><span id="line-340"></span><span class="annot"><a href="GHC.Types.Name.html#nameIsFromExternalPackage"><span class="hs-identifier hs-type">nameIsFromExternalPackage</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#Unit"><span class="hs-identifier hs-type">Unit</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-341"></span><span id="nameIsFromExternalPackage"><span class="annot"><span class="annottext">nameIsFromExternalPackage :: Unit -&gt; Name -&gt; Bool
</span><a href="GHC.Types.Name.html#nameIsFromExternalPackage"><span class="hs-identifier hs-var hs-var">nameIsFromExternalPackage</span></a></span></span><span> </span><span id="local-6989586621680801100"><span class="annot"><span class="annottext">Unit
</span><a href="#local-6989586621680801100"><span class="hs-identifier hs-var">this_unit</span></a></span></span><span> </span><span id="local-6989586621680801099"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801099"><span class="hs-identifier hs-var">name</span></a></span></span><span>
</span><span id="line-342"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680801098"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680801098"><span class="hs-identifier hs-var">mod</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Maybe Module
</span><a href="GHC.Types.Name.html#nameModule_maybe"><span class="hs-identifier hs-var">nameModule_maybe</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801099"><span class="hs-identifier hs-var">name</span></a></span><span>
</span><span id="line-343"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Module -&gt; Unit
forall unit. GenModule unit -&gt; unit
</span><a href="GHC.Unit.Types.html#moduleUnit"><span class="hs-identifier hs-var hs-var">moduleUnit</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680801098"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="annot"><span class="annottext">Unit -&gt; Unit -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">/=</span></span><span> </span><span class="annot"><span class="annottext">Unit
</span><a href="#local-6989586621680801100"><span class="hs-identifier hs-var">this_unit</span></a></span><span>   </span><span class="hs-comment">-- Not the current unit</span><span>
</span><span id="line-344"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Module -&gt; Bool
</span><a href="GHC.Unit.Types.html#isInteractiveModule"><span class="hs-identifier hs-var">isInteractiveModule</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680801098"><span class="hs-identifier hs-var">mod</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-comment">-- Not the 'interactive' package</span><span>
</span><span id="line-345"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-346"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-347"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-348"></span><span>
</span><span id="line-349"></span><span class="annot"><a href="GHC.Types.Name.html#isTyVarName"><span class="hs-identifier hs-type">isTyVarName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-350"></span><span id="isTyVarName"><span class="annot"><span class="annottext">isTyVarName :: Name -&gt; Bool
</span><a href="GHC.Types.Name.html#isTyVarName"><span class="hs-identifier hs-var hs-var">isTyVarName</span></a></span></span><span> </span><span id="local-6989586621680801097"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801097"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OccName -&gt; Bool
</span><a href="GHC.Types.Name.Occurrence.html#isTvOcc"><span class="hs-identifier hs-var">isTvOcc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; OccName
</span><a href="GHC.Types.Name.html#nameOccName"><span class="hs-identifier hs-var">nameOccName</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801097"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-351"></span><span>
</span><span id="line-352"></span><span class="annot"><a href="GHC.Types.Name.html#isTyConName"><span class="hs-identifier hs-type">isTyConName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-353"></span><span id="isTyConName"><span class="annot"><span class="annottext">isTyConName :: Name -&gt; Bool
</span><a href="GHC.Types.Name.html#isTyConName"><span class="hs-identifier hs-var hs-var">isTyConName</span></a></span></span><span> </span><span id="local-6989586621680801095"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801095"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OccName -&gt; Bool
</span><a href="GHC.Types.Name.Occurrence.html#isTcOcc"><span class="hs-identifier hs-var">isTcOcc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; OccName
</span><a href="GHC.Types.Name.html#nameOccName"><span class="hs-identifier hs-var">nameOccName</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801095"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-354"></span><span>
</span><span id="line-355"></span><span class="annot"><a href="GHC.Types.Name.html#isDataConName"><span class="hs-identifier hs-type">isDataConName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-356"></span><span id="isDataConName"><span class="annot"><span class="annottext">isDataConName :: Name -&gt; Bool
</span><a href="GHC.Types.Name.html#isDataConName"><span class="hs-identifier hs-var hs-var">isDataConName</span></a></span></span><span> </span><span id="local-6989586621680801093"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801093"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OccName -&gt; Bool
</span><a href="GHC.Types.Name.Occurrence.html#isDataOcc"><span class="hs-identifier hs-var">isDataOcc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; OccName
</span><a href="GHC.Types.Name.html#nameOccName"><span class="hs-identifier hs-var">nameOccName</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801093"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-357"></span><span>
</span><span id="line-358"></span><span class="annot"><a href="GHC.Types.Name.html#isValName"><span class="hs-identifier hs-type">isValName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-359"></span><span id="isValName"><span class="annot"><span class="annottext">isValName :: Name -&gt; Bool
</span><a href="GHC.Types.Name.html#isValName"><span class="hs-identifier hs-var hs-var">isValName</span></a></span></span><span> </span><span id="local-6989586621680801091"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801091"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OccName -&gt; Bool
</span><a href="GHC.Types.Name.Occurrence.html#isValOcc"><span class="hs-identifier hs-var">isValOcc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; OccName
</span><a href="GHC.Types.Name.html#nameOccName"><span class="hs-identifier hs-var">nameOccName</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801091"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-360"></span><span>
</span><span id="line-361"></span><span class="annot"><a href="GHC.Types.Name.html#isVarName"><span class="hs-identifier hs-type">isVarName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-362"></span><span id="isVarName"><span class="annot"><span class="annottext">isVarName :: Name -&gt; Bool
</span><a href="GHC.Types.Name.html#isVarName"><span class="hs-identifier hs-var hs-var">isVarName</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OccName -&gt; Bool
</span><a href="GHC.Types.Name.Occurrence.html#isVarOcc"><span class="hs-identifier hs-var">isVarOcc</span></a></span><span> </span><span class="annot"><span class="annottext">(OccName -&gt; Bool) -&gt; (Name -&gt; OccName) -&gt; Name -&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; OccName
</span><a href="GHC.Types.Name.html#nameOccName"><span class="hs-identifier hs-var">nameOccName</span></a></span><span>
</span><span id="line-363"></span><span>
</span><span id="line-364"></span><span id="isSystemName"><span class="annot"><span class="annottext">isSystemName :: Name -&gt; Bool
</span><a href="GHC.Types.Name.html#isSystemName"><span class="hs-identifier hs-var hs-var">isSystemName</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-special">{</span><span class="annot"><span class="annottext">n_sort :: Name -&gt; NameSort
</span><a href="GHC.Types.Name.html#n_sort"><span class="hs-identifier hs-var">n_sort</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NameSort
</span><a href="GHC.Types.Name.html#System"><span class="hs-identifier hs-var">System</span></a></span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-365"></span><span class="annot"><a href="GHC.Types.Name.html#isSystemName"><span class="hs-identifier hs-var">isSystemName</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><span class="hs-identifier">_</span></span><span>                        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-366"></span><span>
</span><span id="line-367"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
\subsection{Making names}
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-374"></span><span>
</span><span id="line-375"></span><span class="hs-comment">-- | Create a name which is (for now at least) local to the current module and hence</span><span>
</span><span id="line-376"></span><span class="hs-comment">-- does not need a 'Module' to disambiguate it from other 'Name's</span><span>
</span><span id="line-377"></span><span class="annot"><a href="GHC.Types.Name.html#mkInternalName"><span class="hs-identifier hs-type">mkInternalName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#OccName"><span class="hs-identifier hs-type">OccName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#SrcSpan"><span class="hs-identifier hs-type">SrcSpan</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span>
</span><span id="line-378"></span><span id="mkInternalName"><span class="annot"><span class="annottext">mkInternalName :: Unique -&gt; OccName -&gt; SrcSpan -&gt; Name
</span><a href="GHC.Types.Name.html#mkInternalName"><span class="hs-identifier hs-var hs-var">mkInternalName</span></a></span></span><span> </span><span id="local-6989586621680801088"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680801088"><span class="hs-identifier hs-var">uniq</span></a></span></span><span> </span><span id="local-6989586621680801087"><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680801087"><span class="hs-identifier hs-var">occ</span></a></span></span><span> </span><span id="local-6989586621680801086"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621680801086"><span class="hs-identifier hs-var">loc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name :: NameSort -&gt; OccName -&gt; Unique -&gt; SrcSpan -&gt; Name
</span><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">n_uniq :: Unique
</span><a href="GHC.Types.Name.html#n_uniq"><span class="hs-identifier hs-var">n_uniq</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680801088"><span class="hs-identifier hs-var">uniq</span></a></span><span>
</span><span id="line-379"></span><span>                                   </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">n_sort :: NameSort
</span><a href="GHC.Types.Name.html#n_sort"><span class="hs-identifier hs-var">n_sort</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NameSort
</span><a href="GHC.Types.Name.html#Internal"><span class="hs-identifier hs-var">Internal</span></a></span><span>
</span><span id="line-380"></span><span>                                   </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">n_occ :: OccName
</span><a href="GHC.Types.Name.html#n_occ"><span class="hs-identifier hs-var">n_occ</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680801087"><span class="hs-identifier hs-var">occ</span></a></span><span>
</span><span id="line-381"></span><span>                                   </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">n_loc :: SrcSpan
</span><a href="GHC.Types.Name.html#n_loc"><span class="hs-identifier hs-var">n_loc</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621680801086"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-382"></span><span>        </span><span class="hs-comment">-- NB: You might worry that after lots of huffing and</span><span>
</span><span id="line-383"></span><span>        </span><span class="hs-comment">-- puffing we might end up with two local names with distinct</span><span>
</span><span id="line-384"></span><span>        </span><span class="hs-comment">-- uniques, but the same OccName.  Indeed we can, but that's ok</span><span>
</span><span id="line-385"></span><span>        </span><span class="hs-comment">--      * the insides of the compiler don't care: they use the Unique</span><span>
</span><span id="line-386"></span><span>        </span><span class="hs-comment">--      * when printing for -ddump-xxx you can switch on -dppr-debug to get the</span><span>
</span><span id="line-387"></span><span>        </span><span class="hs-comment">--        uniques if you get confused</span><span>
</span><span id="line-388"></span><span>        </span><span class="hs-comment">--      * for interface files we tidyCore first, which makes</span><span>
</span><span id="line-389"></span><span>        </span><span class="hs-comment">--        the OccNames distinct when they need to be</span><span>
</span><span id="line-390"></span><span>
</span><span id="line-391"></span><span class="annot"><a href="GHC.Types.Name.html#mkClonedInternalName"><span class="hs-identifier hs-type">mkClonedInternalName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span>
</span><span id="line-392"></span><span id="mkClonedInternalName"><span class="annot"><span class="annottext">mkClonedInternalName :: Unique -&gt; Name -&gt; Name
</span><a href="GHC.Types.Name.html#mkClonedInternalName"><span class="hs-identifier hs-var hs-var">mkClonedInternalName</span></a></span></span><span> </span><span id="local-6989586621680801085"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680801085"><span class="hs-identifier hs-var">uniq</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">n_occ :: Name -&gt; OccName
</span><a href="GHC.Types.Name.html#n_occ"><span class="hs-identifier hs-var">n_occ</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680801084"><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680801084"><span class="hs-identifier hs-var">occ</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">n_loc :: Name -&gt; SrcSpan
</span><a href="GHC.Types.Name.html#n_loc"><span class="hs-identifier hs-var">n_loc</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680801083"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621680801083"><span class="hs-identifier hs-var">loc</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-393"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name :: NameSort -&gt; OccName -&gt; Unique -&gt; SrcSpan -&gt; Name
</span><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">n_uniq :: Unique
</span><a href="GHC.Types.Name.html#n_uniq"><span class="hs-identifier hs-var">n_uniq</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680801085"><span class="hs-identifier hs-var">uniq</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">n_sort :: NameSort
</span><a href="GHC.Types.Name.html#n_sort"><span class="hs-identifier hs-var">n_sort</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NameSort
</span><a href="GHC.Types.Name.html#Internal"><span class="hs-identifier hs-var">Internal</span></a></span><span>
</span><span id="line-394"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">n_occ :: OccName
</span><a href="GHC.Types.Name.html#n_occ"><span class="hs-identifier hs-var">n_occ</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680801084"><span class="hs-identifier hs-var">occ</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">n_loc :: SrcSpan
</span><a href="GHC.Types.Name.html#n_loc"><span class="hs-identifier hs-var">n_loc</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621680801083"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-395"></span><span>
</span><span id="line-396"></span><span class="annot"><a href="GHC.Types.Name.html#mkDerivedInternalName"><span class="hs-identifier hs-type">mkDerivedInternalName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#OccName"><span class="hs-identifier hs-type">OccName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#OccName"><span class="hs-identifier hs-type">OccName</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span>
</span><span id="line-397"></span><span id="mkDerivedInternalName"><span class="annot"><span class="annottext">mkDerivedInternalName :: (OccName -&gt; OccName) -&gt; Unique -&gt; Name -&gt; Name
</span><a href="GHC.Types.Name.html#mkDerivedInternalName"><span class="hs-identifier hs-var hs-var">mkDerivedInternalName</span></a></span></span><span> </span><span id="local-6989586621680801082"><span class="annot"><span class="annottext">OccName -&gt; OccName
</span><a href="#local-6989586621680801082"><span class="hs-identifier hs-var">derive_occ</span></a></span></span><span> </span><span id="local-6989586621680801081"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680801081"><span class="hs-identifier hs-var">uniq</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">n_occ :: Name -&gt; OccName
</span><a href="GHC.Types.Name.html#n_occ"><span class="hs-identifier hs-var">n_occ</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680801080"><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680801080"><span class="hs-identifier hs-var">occ</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">n_loc :: Name -&gt; SrcSpan
</span><a href="GHC.Types.Name.html#n_loc"><span class="hs-identifier hs-var">n_loc</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680801079"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621680801079"><span class="hs-identifier hs-var">loc</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-398"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name :: NameSort -&gt; OccName -&gt; Unique -&gt; SrcSpan -&gt; Name
</span><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">n_uniq :: Unique
</span><a href="GHC.Types.Name.html#n_uniq"><span class="hs-identifier hs-var">n_uniq</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680801081"><span class="hs-identifier hs-var">uniq</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">n_sort :: NameSort
</span><a href="GHC.Types.Name.html#n_sort"><span class="hs-identifier hs-var">n_sort</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NameSort
</span><a href="GHC.Types.Name.html#Internal"><span class="hs-identifier hs-var">Internal</span></a></span><span>
</span><span id="line-399"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">n_occ :: OccName
</span><a href="GHC.Types.Name.html#n_occ"><span class="hs-identifier hs-var">n_occ</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OccName -&gt; OccName
</span><a href="#local-6989586621680801082"><span class="hs-identifier hs-var">derive_occ</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680801080"><span class="hs-identifier hs-var">occ</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">n_loc :: SrcSpan
</span><a href="GHC.Types.Name.html#n_loc"><span class="hs-identifier hs-var">n_loc</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621680801079"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-400"></span><span>
</span><span id="line-401"></span><span class="hs-comment">-- | Create a name which definitely originates in the given module</span><span>
</span><span id="line-402"></span><span class="annot"><a href="GHC.Types.Name.html#mkExternalName"><span class="hs-identifier hs-type">mkExternalName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#Module"><span class="hs-identifier hs-type">Module</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#OccName"><span class="hs-identifier hs-type">OccName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#SrcSpan"><span class="hs-identifier hs-type">SrcSpan</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span>
</span><span id="line-403"></span><span class="hs-comment">-- WATCH OUT! External Names should be in the Name Cache</span><span>
</span><span id="line-404"></span><span class="hs-comment">-- (see Note [The Name Cache] in GHC.Iface.Env), so don't just call mkExternalName</span><span>
</span><span id="line-405"></span><span class="hs-comment">-- with some fresh unique without populating the Name Cache</span><span>
</span><span id="line-406"></span><span id="mkExternalName"><span class="annot"><span class="annottext">mkExternalName :: Unique -&gt; Module -&gt; OccName -&gt; SrcSpan -&gt; Name
</span><a href="GHC.Types.Name.html#mkExternalName"><span class="hs-identifier hs-var hs-var">mkExternalName</span></a></span></span><span> </span><span id="local-6989586621680801078"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680801078"><span class="hs-identifier hs-var">uniq</span></a></span></span><span> </span><span id="local-6989586621680801077"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680801077"><span class="hs-identifier hs-var">mod</span></a></span></span><span> </span><span id="local-6989586621680801076"><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680801076"><span class="hs-identifier hs-var">occ</span></a></span></span><span> </span><span id="local-6989586621680801075"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621680801075"><span class="hs-identifier hs-var">loc</span></a></span></span><span>
</span><span id="line-407"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name :: NameSort -&gt; OccName -&gt; Unique -&gt; SrcSpan -&gt; Name
</span><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">n_uniq :: Unique
</span><a href="GHC.Types.Name.html#n_uniq"><span class="hs-identifier hs-var">n_uniq</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680801078"><span class="hs-identifier hs-var">uniq</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">n_sort :: NameSort
</span><a href="GHC.Types.Name.html#n_sort"><span class="hs-identifier hs-var">n_sort</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Module -&gt; NameSort
</span><a href="GHC.Types.Name.html#External"><span class="hs-identifier hs-var">External</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680801077"><span class="hs-identifier hs-var">mod</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-408"></span><span>           </span><span class="annot"><span class="annottext">n_occ :: OccName
</span><a href="GHC.Types.Name.html#n_occ"><span class="hs-identifier hs-var">n_occ</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680801076"><span class="hs-identifier hs-var">occ</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">n_loc :: SrcSpan
</span><a href="GHC.Types.Name.html#n_loc"><span class="hs-identifier hs-var">n_loc</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621680801075"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-409"></span><span>
</span><span id="line-410"></span><span class="hs-comment">-- | Create a name which is actually defined by the compiler itself</span><span>
</span><span id="line-411"></span><span class="annot"><a href="GHC.Types.Name.html#mkWiredInName"><span class="hs-identifier hs-type">mkWiredInName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#Module"><span class="hs-identifier hs-type">Module</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#OccName"><span class="hs-identifier hs-type">OccName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#TyThing"><span class="hs-identifier hs-type">TyThing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#BuiltInSyntax"><span class="hs-identifier hs-type">BuiltInSyntax</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span>
</span><span id="line-412"></span><span id="mkWiredInName"><span class="annot"><span class="annottext">mkWiredInName :: Module -&gt; OccName -&gt; Unique -&gt; TyThing -&gt; BuiltInSyntax -&gt; Name
</span><a href="GHC.Types.Name.html#mkWiredInName"><span class="hs-identifier hs-var hs-var">mkWiredInName</span></a></span></span><span> </span><span id="local-6989586621680801074"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680801074"><span class="hs-identifier hs-var">mod</span></a></span></span><span> </span><span id="local-6989586621680801073"><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680801073"><span class="hs-identifier hs-var">occ</span></a></span></span><span> </span><span id="local-6989586621680801072"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680801072"><span class="hs-identifier hs-var">uniq</span></a></span></span><span> </span><span id="local-6989586621680801071"><span class="annot"><span class="annottext">TyThing
</span><a href="#local-6989586621680801071"><span class="hs-identifier hs-var">thing</span></a></span></span><span> </span><span id="local-6989586621680801070"><span class="annot"><span class="annottext">BuiltInSyntax
</span><a href="#local-6989586621680801070"><span class="hs-identifier hs-var">built_in</span></a></span></span><span>
</span><span id="line-413"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name :: NameSort -&gt; OccName -&gt; Unique -&gt; SrcSpan -&gt; Name
</span><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">n_uniq :: Unique
</span><a href="GHC.Types.Name.html#n_uniq"><span class="hs-identifier hs-var">n_uniq</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680801072"><span class="hs-identifier hs-var">uniq</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-414"></span><span>           </span><span class="annot"><span class="annottext">n_sort :: NameSort
</span><a href="GHC.Types.Name.html#n_sort"><span class="hs-identifier hs-var">n_sort</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Module -&gt; TyThing -&gt; BuiltInSyntax -&gt; NameSort
</span><a href="GHC.Types.Name.html#WiredIn"><span class="hs-identifier hs-var">WiredIn</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680801074"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="annot"><span class="annottext">TyThing
</span><a href="#local-6989586621680801071"><span class="hs-identifier hs-var">thing</span></a></span><span> </span><span class="annot"><span class="annottext">BuiltInSyntax
</span><a href="#local-6989586621680801070"><span class="hs-identifier hs-var">built_in</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-415"></span><span>           </span><span class="annot"><span class="annottext">n_occ :: OccName
</span><a href="GHC.Types.Name.html#n_occ"><span class="hs-identifier hs-var">n_occ</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680801073"><span class="hs-identifier hs-var">occ</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">n_loc :: SrcSpan
</span><a href="GHC.Types.Name.html#n_loc"><span class="hs-identifier hs-var">n_loc</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="GHC.Types.SrcLoc.html#wiredInSrcSpan"><span class="hs-identifier hs-var">wiredInSrcSpan</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-416"></span><span>
</span><span id="line-417"></span><span class="hs-comment">-- | Create a name brought into being by the compiler</span><span>
</span><span id="line-418"></span><span class="annot"><a href="GHC.Types.Name.html#mkSystemName"><span class="hs-identifier hs-type">mkSystemName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#OccName"><span class="hs-identifier hs-type">OccName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span>
</span><span id="line-419"></span><span id="mkSystemName"><span class="annot"><span class="annottext">mkSystemName :: Unique -&gt; OccName -&gt; Name
</span><a href="GHC.Types.Name.html#mkSystemName"><span class="hs-identifier hs-var hs-var">mkSystemName</span></a></span></span><span> </span><span id="local-6989586621680801068"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680801068"><span class="hs-identifier hs-var">uniq</span></a></span></span><span> </span><span id="local-6989586621680801067"><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680801067"><span class="hs-identifier hs-var">occ</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Unique -&gt; OccName -&gt; SrcSpan -&gt; Name
</span><a href="GHC.Types.Name.html#mkSystemNameAt"><span class="hs-identifier hs-var">mkSystemNameAt</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680801068"><span class="hs-identifier hs-var">uniq</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680801067"><span class="hs-identifier hs-var">occ</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="GHC.Types.SrcLoc.html#noSrcSpan"><span class="hs-identifier hs-var">noSrcSpan</span></a></span><span>
</span><span id="line-420"></span><span>
</span><span id="line-421"></span><span class="annot"><a href="GHC.Types.Name.html#mkSystemNameAt"><span class="hs-identifier hs-type">mkSystemNameAt</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#OccName"><span class="hs-identifier hs-type">OccName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#SrcSpan"><span class="hs-identifier hs-type">SrcSpan</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span>
</span><span id="line-422"></span><span id="mkSystemNameAt"><span class="annot"><span class="annottext">mkSystemNameAt :: Unique -&gt; OccName -&gt; SrcSpan -&gt; Name
</span><a href="GHC.Types.Name.html#mkSystemNameAt"><span class="hs-identifier hs-var hs-var">mkSystemNameAt</span></a></span></span><span> </span><span id="local-6989586621680801065"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680801065"><span class="hs-identifier hs-var">uniq</span></a></span></span><span> </span><span id="local-6989586621680801064"><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680801064"><span class="hs-identifier hs-var">occ</span></a></span></span><span> </span><span id="local-6989586621680801063"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621680801063"><span class="hs-identifier hs-var">loc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name :: NameSort -&gt; OccName -&gt; Unique -&gt; SrcSpan -&gt; Name
</span><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">n_uniq :: Unique
</span><a href="GHC.Types.Name.html#n_uniq"><span class="hs-identifier hs-var">n_uniq</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680801065"><span class="hs-identifier hs-var">uniq</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">n_sort :: NameSort
</span><a href="GHC.Types.Name.html#n_sort"><span class="hs-identifier hs-var">n_sort</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NameSort
</span><a href="GHC.Types.Name.html#System"><span class="hs-identifier hs-var">System</span></a></span><span>
</span><span id="line-423"></span><span>                                   </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">n_occ :: OccName
</span><a href="GHC.Types.Name.html#n_occ"><span class="hs-identifier hs-var">n_occ</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680801064"><span class="hs-identifier hs-var">occ</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">n_loc :: SrcSpan
</span><a href="GHC.Types.Name.html#n_loc"><span class="hs-identifier hs-var">n_loc</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621680801063"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-424"></span><span>
</span><span id="line-425"></span><span class="annot"><a href="GHC.Types.Name.html#mkSystemVarName"><span class="hs-identifier hs-type">mkSystemVarName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Data.FastString.html#FastString"><span class="hs-identifier hs-type">FastString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span>
</span><span id="line-426"></span><span id="mkSystemVarName"><span class="annot"><span class="annottext">mkSystemVarName :: Unique -&gt; FastString -&gt; Name
</span><a href="GHC.Types.Name.html#mkSystemVarName"><span class="hs-identifier hs-var hs-var">mkSystemVarName</span></a></span></span><span> </span><span id="local-6989586621680801062"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680801062"><span class="hs-identifier hs-var">uniq</span></a></span></span><span> </span><span id="local-6989586621680801061"><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680801061"><span class="hs-identifier hs-var">fs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Unique -&gt; OccName -&gt; Name
</span><a href="GHC.Types.Name.html#mkSystemName"><span class="hs-identifier hs-var">mkSystemName</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680801062"><span class="hs-identifier hs-var">uniq</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FastString -&gt; OccName
</span><a href="GHC.Types.Name.Occurrence.html#mkVarOccFS"><span class="hs-identifier hs-var">mkVarOccFS</span></a></span><span> </span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680801061"><span class="hs-identifier hs-var">fs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-427"></span><span>
</span><span id="line-428"></span><span class="annot"><a href="GHC.Types.Name.html#mkSysTvName"><span class="hs-identifier hs-type">mkSysTvName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Data.FastString.html#FastString"><span class="hs-identifier hs-type">FastString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span>
</span><span id="line-429"></span><span id="mkSysTvName"><span class="annot"><span class="annottext">mkSysTvName :: Unique -&gt; FastString -&gt; Name
</span><a href="GHC.Types.Name.html#mkSysTvName"><span class="hs-identifier hs-var hs-var">mkSysTvName</span></a></span></span><span> </span><span id="local-6989586621680801059"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680801059"><span class="hs-identifier hs-var">uniq</span></a></span></span><span> </span><span id="local-6989586621680801058"><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680801058"><span class="hs-identifier hs-var">fs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Unique -&gt; OccName -&gt; Name
</span><a href="GHC.Types.Name.html#mkSystemName"><span class="hs-identifier hs-var">mkSystemName</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680801059"><span class="hs-identifier hs-var">uniq</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FastString -&gt; OccName
</span><a href="GHC.Types.Name.Occurrence.html#mkTyVarOccFS"><span class="hs-identifier hs-var">mkTyVarOccFS</span></a></span><span> </span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680801058"><span class="hs-identifier hs-var">fs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-430"></span><span>
</span><span id="line-431"></span><span class="hs-comment">-- | Make a name for a foreign call</span><span>
</span><span id="line-432"></span><span class="annot"><a href="GHC.Types.Name.html#mkFCallName"><span class="hs-identifier hs-type">mkFCallName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span>
</span><span id="line-433"></span><span id="mkFCallName"><span class="annot"><span class="annottext">mkFCallName :: Unique -&gt; String -&gt; Name
</span><a href="GHC.Types.Name.html#mkFCallName"><span class="hs-identifier hs-var hs-var">mkFCallName</span></a></span></span><span> </span><span id="local-6989586621680801056"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680801056"><span class="hs-identifier hs-var">uniq</span></a></span></span><span> </span><span id="local-6989586621680801055"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680801055"><span class="hs-identifier hs-var">str</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Unique -&gt; OccName -&gt; SrcSpan -&gt; Name
</span><a href="GHC.Types.Name.html#mkInternalName"><span class="hs-identifier hs-var">mkInternalName</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680801056"><span class="hs-identifier hs-var">uniq</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; OccName
</span><a href="GHC.Types.Name.Occurrence.html#mkVarOcc"><span class="hs-identifier hs-var">mkVarOcc</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680801055"><span class="hs-identifier hs-var">str</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="GHC.Types.SrcLoc.html#noSrcSpan"><span class="hs-identifier hs-var">noSrcSpan</span></a></span><span>
</span><span id="line-434"></span><span>   </span><span class="hs-comment">-- The encoded string completely describes the ccall</span><span>
</span><span id="line-435"></span><span>
</span><span id="line-436"></span><span class="hs-comment">-- When we renumber/rename things, we need to be</span><span>
</span><span id="line-437"></span><span class="hs-comment">-- able to change a Name's Unique to match the cached</span><span>
</span><span id="line-438"></span><span class="hs-comment">-- one in the thing it's the name of.  If you know what I mean.</span><span>
</span><span id="line-439"></span><span class="annot"><a href="GHC.Types.Name.html#setNameUnique"><span class="hs-identifier hs-type">setNameUnique</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span>
</span><span id="line-440"></span><span id="setNameUnique"><span class="annot"><span class="annottext">setNameUnique :: Name -&gt; Unique -&gt; Name
</span><a href="GHC.Types.Name.html#setNameUnique"><span class="hs-identifier hs-var hs-var">setNameUnique</span></a></span></span><span> </span><span id="local-6989586621680801053"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801053"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span id="local-6989586621680801052"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680801052"><span class="hs-identifier hs-var">uniq</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801053"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="hs-special">{</span><span class="annot"><span class="annottext">n_uniq :: Unique
</span><a href="GHC.Types.Name.html#n_uniq"><span class="hs-identifier hs-var">n_uniq</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680801052"><span class="hs-identifier hs-var">uniq</span></a></span><span class="hs-special">}</span><span>
</span><span id="line-441"></span><span>
</span><span id="line-442"></span><span class="hs-comment">-- This is used for hsigs: we want to use the name of the originally exported</span><span>
</span><span id="line-443"></span><span class="hs-comment">-- entity, but edit the location to refer to the reexport site</span><span>
</span><span id="line-444"></span><span class="annot"><a href="GHC.Types.Name.html#setNameLoc"><span class="hs-identifier hs-type">setNameLoc</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#SrcSpan"><span class="hs-identifier hs-type">SrcSpan</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span>
</span><span id="line-445"></span><span id="setNameLoc"><span class="annot"><span class="annottext">setNameLoc :: Name -&gt; SrcSpan -&gt; Name
</span><a href="GHC.Types.Name.html#setNameLoc"><span class="hs-identifier hs-var hs-var">setNameLoc</span></a></span></span><span> </span><span id="local-6989586621680801051"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801051"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span id="local-6989586621680801050"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621680801050"><span class="hs-identifier hs-var">loc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801051"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="hs-special">{</span><span class="annot"><span class="annottext">n_loc :: SrcSpan
</span><a href="GHC.Types.Name.html#n_loc"><span class="hs-identifier hs-var">n_loc</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621680801050"><span class="hs-identifier hs-var">loc</span></a></span><span class="hs-special">}</span><span>
</span><span id="line-446"></span><span>
</span><span id="line-447"></span><span class="annot"><a href="GHC.Types.Name.html#tidyNameOcc"><span class="hs-identifier hs-type">tidyNameOcc</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#OccName"><span class="hs-identifier hs-type">OccName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span>
</span><span id="line-448"></span><span class="hs-comment">-- We set the OccName of a Name when tidying</span><span>
</span><span id="line-449"></span><span class="hs-comment">-- In doing so, we change System --&gt; Internal, so that when we print</span><span>
</span><span id="line-450"></span><span class="hs-comment">-- it we don't get the unique by default.  It's tidy now!</span><span>
</span><span id="line-451"></span><span id="tidyNameOcc"><span class="annot"><span class="annottext">tidyNameOcc :: Name -&gt; OccName -&gt; Name
</span><a href="GHC.Types.Name.html#tidyNameOcc"><span class="hs-identifier hs-var hs-var">tidyNameOcc</span></a></span></span><span> </span><span id="local-6989586621680801049"><span class="annot"><span class="annottext">name :: Name
</span><a href="#local-6989586621680801049"><span class="hs-identifier hs-var">name</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">n_sort :: Name -&gt; NameSort
</span><a href="GHC.Types.Name.html#n_sort"><span class="hs-identifier hs-var">n_sort</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NameSort
</span><a href="GHC.Types.Name.html#System"><span class="hs-identifier hs-var">System</span></a></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span id="local-6989586621680801048"><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680801048"><span class="hs-identifier hs-var">occ</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801049"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">n_occ :: OccName
</span><a href="GHC.Types.Name.html#n_occ"><span class="hs-identifier hs-var">n_occ</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680801048"><span class="hs-identifier hs-var">occ</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">n_sort :: NameSort
</span><a href="GHC.Types.Name.html#n_sort"><span class="hs-identifier hs-var">n_sort</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NameSort
</span><a href="GHC.Types.Name.html#Internal"><span class="hs-identifier hs-var">Internal</span></a></span><span class="hs-special">}</span><span>
</span><span id="line-452"></span><span class="annot"><a href="GHC.Types.Name.html#tidyNameOcc"><span class="hs-identifier hs-var">tidyNameOcc</span></a></span><span> </span><span id="local-6989586621680801047"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801047"><span class="hs-identifier hs-var">name</span></a></span></span><span>                            </span><span id="local-6989586621680801046"><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680801046"><span class="hs-identifier hs-var">occ</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801047"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">n_occ :: OccName
</span><a href="GHC.Types.Name.html#n_occ"><span class="hs-identifier hs-var">n_occ</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680801046"><span class="hs-identifier hs-var">occ</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-453"></span><span>
</span><span id="line-454"></span><span class="hs-comment">-- | Make the 'Name' into an internal name, regardless of what it was to begin with</span><span>
</span><span id="line-455"></span><span class="annot"><a href="GHC.Types.Name.html#localiseName"><span class="hs-identifier hs-type">localiseName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span>
</span><span id="line-456"></span><span id="localiseName"><span class="annot"><span class="annottext">localiseName :: Name -&gt; Name
</span><a href="GHC.Types.Name.html#localiseName"><span class="hs-identifier hs-var hs-var">localiseName</span></a></span></span><span> </span><span id="local-6989586621680801045"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801045"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801045"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">n_sort :: NameSort
</span><a href="GHC.Types.Name.html#n_sort"><span class="hs-identifier hs-var">n_sort</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NameSort
</span><a href="GHC.Types.Name.html#Internal"><span class="hs-identifier hs-var">Internal</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-457"></span><span>
</span><span id="line-458"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
\subsection{Hashing and comparison}
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-465"></span><span>
</span><span id="line-466"></span><span class="annot"><a href="GHC.Types.Name.html#cmpName"><span class="hs-identifier hs-type">cmpName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Ordering</span></span><span>
</span><span id="line-467"></span><span id="cmpName"><span class="annot"><span class="annottext">cmpName :: Name -&gt; Name -&gt; Ordering
</span><a href="GHC.Types.Name.html#cmpName"><span class="hs-identifier hs-var hs-var">cmpName</span></a></span></span><span> </span><span id="local-6989586621680801043"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801043"><span class="hs-identifier hs-var">n1</span></a></span></span><span> </span><span id="local-6989586621680801042"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801042"><span class="hs-identifier hs-var">n2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Unique
</span><a href="GHC.Types.Name.html#n_uniq"><span class="hs-identifier hs-var hs-var">n_uniq</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801043"><span class="hs-identifier hs-var">n1</span></a></span><span> </span><span class="annot"><span class="annottext">Unique -&gt; Unique -&gt; Ordering
</span><a href="GHC.Types.Unique.html#nonDetCmpUnique"><span class="hs-operator hs-var">`nonDetCmpUnique`</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; Unique
</span><a href="GHC.Types.Name.html#n_uniq"><span class="hs-identifier hs-var hs-var">n_uniq</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801042"><span class="hs-identifier hs-var">n2</span></a></span><span>
</span><span id="line-468"></span><span>
</span><span id="line-469"></span><span class="hs-comment">-- | Compare Names lexicographically</span><span>
</span><span id="line-470"></span><span class="hs-comment">-- This only works for Names that originate in the source code or have been</span><span>
</span><span id="line-471"></span><span class="hs-comment">-- tidied.</span><span>
</span><span id="line-472"></span><span class="annot"><a href="GHC.Types.Name.html#stableNameCmp"><span class="hs-identifier hs-type">stableNameCmp</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Ordering</span></span><span>
</span><span id="line-473"></span><span id="stableNameCmp"><span class="annot"><span class="annottext">stableNameCmp :: Name -&gt; Name -&gt; Ordering
</span><a href="GHC.Types.Name.html#stableNameCmp"><span class="hs-identifier hs-var hs-var">stableNameCmp</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">n_sort :: Name -&gt; NameSort
</span><a href="GHC.Types.Name.html#n_sort"><span class="hs-identifier hs-var">n_sort</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680801040"><span class="annot"><span class="annottext">NameSort
</span><a href="#local-6989586621680801040"><span class="hs-identifier hs-var">s1</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">n_occ :: Name -&gt; OccName
</span><a href="GHC.Types.Name.html#n_occ"><span class="hs-identifier hs-var">n_occ</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680801039"><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680801039"><span class="hs-identifier hs-var">occ1</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-474"></span><span>              </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">n_sort :: Name -&gt; NameSort
</span><a href="GHC.Types.Name.html#n_sort"><span class="hs-identifier hs-var">n_sort</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680801038"><span class="annot"><span class="annottext">NameSort
</span><a href="#local-6989586621680801038"><span class="hs-identifier hs-var">s2</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">n_occ :: Name -&gt; OccName
</span><a href="GHC.Types.Name.html#n_occ"><span class="hs-identifier hs-var">n_occ</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680801037"><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680801037"><span class="hs-identifier hs-var">occ2</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-475"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NameSort
</span><a href="#local-6989586621680801040"><span class="hs-identifier hs-var">s1</span></a></span><span> </span><span class="annot"><span class="annottext">NameSort -&gt; NameSort -&gt; Ordering
</span><a href="#local-6989586621680801036"><span class="hs-operator hs-var">`sort_cmp`</span></a></span><span> </span><span class="annot"><span class="annottext">NameSort
</span><a href="#local-6989586621680801038"><span class="hs-identifier hs-var">s2</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Ordering -&gt; Ordering -&gt; Ordering
</span><a href="GHC.Utils.Misc.html#thenCmp"><span class="hs-operator hs-var">`thenCmp`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680801039"><span class="hs-identifier hs-var">occ1</span></a></span><span> </span><span class="annot"><span class="annottext">OccName -&gt; OccName -&gt; Ordering
forall a. Ord a =&gt; a -&gt; a -&gt; Ordering
</span><span class="hs-operator hs-var">`compare`</span></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680801037"><span class="hs-identifier hs-var">occ2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-476"></span><span>    </span><span class="hs-comment">-- The ordinary compare on OccNames is lexicographic</span><span>
</span><span id="line-477"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-478"></span><span>    </span><span class="hs-comment">-- Later constructors are bigger</span><span>
</span><span id="line-479"></span><span>    </span><span id="local-6989586621680801036"><span class="annot"><span class="annottext">sort_cmp :: NameSort -&gt; NameSort -&gt; Ordering
</span><a href="#local-6989586621680801036"><span class="hs-identifier hs-var hs-var">sort_cmp</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.html#External"><span class="hs-identifier hs-type">External</span></a></span><span> </span><span id="local-6989586621680801033"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680801033"><span class="hs-identifier hs-var">m1</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.html#External"><span class="hs-identifier hs-type">External</span></a></span><span> </span><span id="local-6989586621680801032"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680801032"><span class="hs-identifier hs-var">m2</span></a></span></span><span class="hs-special">)</span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680801033"><span class="hs-identifier hs-var">m1</span></a></span><span> </span><span class="annot"><span class="annottext">Module -&gt; Module -&gt; Ordering
</span><a href="GHC.Unit.Module.html#stableModuleCmp"><span class="hs-operator hs-var">`stableModuleCmp`</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680801032"><span class="hs-identifier hs-var">m2</span></a></span><span>
</span><span id="line-480"></span><span>    </span><span class="annot"><a href="#local-6989586621680801036"><span class="hs-identifier hs-var">sort_cmp</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.html#External"><span class="hs-identifier hs-type">External</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">NameSort
</span><span class="hs-identifier">_</span></span><span>                   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">LT</span></span><span>
</span><span id="line-481"></span><span>    </span><span class="annot"><a href="#local-6989586621680801036"><span class="hs-identifier hs-var">sort_cmp</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.html#WiredIn"><span class="hs-identifier hs-type">WiredIn</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.html#External"><span class="hs-identifier hs-type">External</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">GT</span></span><span>
</span><span id="line-482"></span><span>    </span><span class="annot"><a href="#local-6989586621680801036"><span class="hs-identifier hs-var">sort_cmp</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.html#WiredIn"><span class="hs-identifier hs-type">WiredIn</span></a></span><span> </span><span id="local-6989586621680801030"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680801030"><span class="hs-identifier hs-var">m1</span></a></span></span><span> </span><span class="annot"><span class="annottext">TyThing
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">BuiltInSyntax
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.html#WiredIn"><span class="hs-identifier hs-type">WiredIn</span></a></span><span> </span><span id="local-6989586621680801029"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680801029"><span class="hs-identifier hs-var">m2</span></a></span></span><span> </span><span class="annot"><span class="annottext">TyThing
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">BuiltInSyntax
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680801030"><span class="hs-identifier hs-var">m1</span></a></span><span> </span><span class="annot"><span class="annottext">Module -&gt; Module -&gt; Ordering
</span><a href="GHC.Unit.Module.html#stableModuleCmp"><span class="hs-operator hs-var">`stableModuleCmp`</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680801029"><span class="hs-identifier hs-var">m2</span></a></span><span>
</span><span id="line-483"></span><span>    </span><span class="annot"><a href="#local-6989586621680801036"><span class="hs-identifier hs-var">sort_cmp</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.html#WiredIn"><span class="hs-identifier hs-type">WiredIn</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>     </span><span class="annot"><span class="annottext">NameSort
</span><span class="hs-identifier">_</span></span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">LT</span></span><span>
</span><span id="line-484"></span><span>    </span><span class="annot"><a href="#local-6989586621680801036"><span class="hs-identifier hs-var">sort_cmp</span></a></span><span> </span><span class="annot"><span class="annottext">NameSort
</span><a href="GHC.Types.Name.html#Internal"><span class="hs-identifier hs-var">Internal</span></a></span><span>         </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.html#External"><span class="hs-identifier hs-type">External</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">GT</span></span><span>
</span><span id="line-485"></span><span>    </span><span class="annot"><a href="#local-6989586621680801036"><span class="hs-identifier hs-var">sort_cmp</span></a></span><span> </span><span class="annot"><span class="annottext">NameSort
</span><a href="GHC.Types.Name.html#Internal"><span class="hs-identifier hs-var">Internal</span></a></span><span>         </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.html#WiredIn"><span class="hs-identifier hs-type">WiredIn</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">GT</span></span><span>
</span><span id="line-486"></span><span>    </span><span class="annot"><a href="#local-6989586621680801036"><span class="hs-identifier hs-var">sort_cmp</span></a></span><span> </span><span class="annot"><span class="annottext">NameSort
</span><a href="GHC.Types.Name.html#Internal"><span class="hs-identifier hs-var">Internal</span></a></span><span>         </span><span class="annot"><span class="annottext">NameSort
</span><a href="GHC.Types.Name.html#Internal"><span class="hs-identifier hs-var">Internal</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">EQ</span></span><span>
</span><span id="line-487"></span><span>    </span><span class="annot"><a href="#local-6989586621680801036"><span class="hs-identifier hs-var">sort_cmp</span></a></span><span> </span><span class="annot"><span class="annottext">NameSort
</span><a href="GHC.Types.Name.html#Internal"><span class="hs-identifier hs-var">Internal</span></a></span><span>         </span><span class="annot"><span class="annottext">NameSort
</span><a href="GHC.Types.Name.html#System"><span class="hs-identifier hs-var">System</span></a></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">LT</span></span><span>
</span><span id="line-488"></span><span>    </span><span class="annot"><a href="#local-6989586621680801036"><span class="hs-identifier hs-var">sort_cmp</span></a></span><span> </span><span class="annot"><span class="annottext">NameSort
</span><a href="GHC.Types.Name.html#System"><span class="hs-identifier hs-var">System</span></a></span><span>           </span><span class="annot"><span class="annottext">NameSort
</span><a href="GHC.Types.Name.html#System"><span class="hs-identifier hs-var">System</span></a></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">EQ</span></span><span>
</span><span id="line-489"></span><span>    </span><span class="annot"><a href="#local-6989586621680801036"><span class="hs-identifier hs-var">sort_cmp</span></a></span><span> </span><span class="annot"><span class="annottext">NameSort
</span><a href="GHC.Types.Name.html#System"><span class="hs-identifier hs-var">System</span></a></span><span>           </span><span class="annot"><span class="annottext">NameSort
</span><span class="hs-identifier">_</span></span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">GT</span></span><span>
</span><span id="line-490"></span><span>
</span><span id="line-491"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
\subsection[Name-instances]{Instance declarations}
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-498"></span><span>
</span><span id="line-499"></span><span class="hs-comment">-- | The same comments as for `Name`'s `Ord` instance apply.</span><span>
</span><span id="line-500"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Eq</span></span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-501"></span><span>    </span><span id="local-6989586621680801023"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801023"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621680801022"><span class="annot"><span class="annottext">== :: Name -&gt; Name -&gt; Bool
</span><span class="hs-operator hs-var hs-var hs-var hs-var">==</span></span></span><span> </span><span id="local-6989586621680801021"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801021"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801023"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; Name -&gt; Ordering
forall a. Ord a =&gt; a -&gt; a -&gt; Ordering
</span><span class="hs-operator hs-var">`compare`</span></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801021"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">EQ</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span class="hs-special">;</span><span>  </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-502"></span><span>    </span><span id="local-6989586621680801019"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801019"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621680801018"><span class="annot"><span class="annottext">/= :: Name -&gt; Name -&gt; Bool
</span><a href="#local-6989586621680801018"><span class="hs-operator hs-var hs-var hs-var hs-var">/=</span></a></span></span><span> </span><span id="local-6989586621680801017"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801017"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801019"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; Name -&gt; Ordering
forall a. Ord a =&gt; a -&gt; a -&gt; Ordering
</span><span class="hs-operator hs-var">`compare`</span></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801017"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">EQ</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-503"></span><span>
</span><span id="line-504"></span><span class="hs-comment">-- | __Caution__: This instance is implemented via `nonDetCmpUnique`, which</span><span>
</span><span id="line-505"></span><span class="hs-comment">-- means that the ordering is not stable across deserialization or rebuilds.</span><span>
</span><span id="line-506"></span><span class="hs-comment">--</span><span>
</span><span id="line-507"></span><span class="hs-comment">-- See `nonDetCmpUnique` for further information, and trac #15240 for a bug</span><span>
</span><span id="line-508"></span><span class="hs-comment">-- caused by improper use of this instance.</span><span>
</span><span id="line-509"></span><span>
</span><span id="line-510"></span><span class="hs-comment">-- For a deterministic lexicographic ordering, use `stableNameCmp`.</span><span>
</span><span id="line-511"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680801006"><span id="local-6989586621680801008"><span class="annot"><span class="hs-identifier hs-type">Ord</span></span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-512"></span><span>    </span><span id="local-6989586621680801003"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801003"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621680801002"><span class="annot"><span class="annottext">&lt;= :: Name -&gt; Name -&gt; Bool
</span><span class="hs-operator hs-var hs-var hs-var hs-var">&lt;=</span></span></span><span> </span><span id="local-6989586621680801000"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801000"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801003"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; Name -&gt; Ordering
forall a. Ord a =&gt; a -&gt; a -&gt; Ordering
</span><span class="hs-operator hs-var">`compare`</span></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680801000"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">LT</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span class="hs-special">;</span><span>  </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">EQ</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span class="hs-special">;</span><span>  </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">GT</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-513"></span><span>    </span><span id="local-6989586621680800998"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680800998"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621680800997"><span class="annot"><span class="annottext">&lt; :: Name -&gt; Name -&gt; Bool
</span><span class="hs-operator hs-var hs-var hs-var hs-var">&lt;</span></span></span><span>  </span><span id="local-6989586621680800995"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680800995"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680800998"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; Name -&gt; Ordering
forall a. Ord a =&gt; a -&gt; a -&gt; Ordering
</span><span class="hs-operator hs-var">`compare`</span></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680800995"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">LT</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span class="hs-special">;</span><span>  </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">EQ</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">GT</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-514"></span><span>    </span><span id="local-6989586621680800993"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680800993"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621680800992"><span class="annot"><span class="annottext">&gt;= :: Name -&gt; Name -&gt; Bool
</span><span class="hs-operator hs-var hs-var hs-var hs-var">&gt;=</span></span></span><span> </span><span id="local-6989586621680800991"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680800991"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680800993"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; Name -&gt; Ordering
forall a. Ord a =&gt; a -&gt; a -&gt; Ordering
</span><span class="hs-operator hs-var">`compare`</span></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680800991"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">LT</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">EQ</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span class="hs-special">;</span><span>  </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">GT</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>  </span><span class="hs-special">}</span><span>
</span><span id="line-515"></span><span>    </span><span id="local-6989586621680800989"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680800989"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621680800988"><span class="annot"><span class="annottext">&gt; :: Name -&gt; Name -&gt; Bool
</span><span class="hs-operator hs-var hs-var hs-var hs-var">&gt;</span></span></span><span>  </span><span id="local-6989586621680800986"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680800986"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680800989"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; Name -&gt; Ordering
forall a. Ord a =&gt; a -&gt; a -&gt; Ordering
</span><span class="hs-operator hs-var">`compare`</span></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680800986"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">LT</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">EQ</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">GT</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>  </span><span class="hs-special">}</span><span>
</span><span id="line-516"></span><span>    </span><span id="local-6989586621680800985"><span class="annot"><span class="annottext">compare :: Name -&gt; Name -&gt; Ordering
</span><a href="#local-6989586621680800985"><span class="hs-identifier hs-var hs-var hs-var hs-var">compare</span></a></span></span><span> </span><span id="local-6989586621680800984"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680800984"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621680800983"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680800983"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Name -&gt; Ordering
</span><a href="GHC.Types.Name.html#cmpName"><span class="hs-identifier hs-var">cmpName</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680800984"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680800983"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-517"></span><span>
</span><span id="line-518"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Uniquable"><span class="hs-identifier hs-type">Uniquable</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-519"></span><span>    </span><span id="local-6989586621680800979"><span class="annot"><span class="annottext">getUnique :: Name -&gt; Unique
</span><a href="GHC.Types.Unique.html#getUnique"><span class="hs-identifier hs-var hs-var hs-var hs-var">getUnique</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Unique
</span><a href="GHC.Types.Name.html#nameUnique"><span class="hs-identifier hs-var">nameUnique</span></a></span><span>
</span><span id="line-520"></span><span>
</span><span id="line-521"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680800976"><span class="annot"><a href="GHC.Types.Name.html#NamedThing"><span class="hs-identifier hs-type">NamedThing</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-522"></span><span>    </span><span id="local-6989586621680800973"><span class="annot"><span class="annottext">getName :: Name -&gt; Name
</span><a href="#local-6989586621680800973"><span class="hs-identifier hs-var hs-var hs-var hs-var">getName</span></a></span></span><span> </span><span id="local-6989586621680800972"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680800972"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680800972"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-523"></span><span>
</span><span id="line-524"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680800945"><span id="local-6989586621680800947"><span id="local-6989586621680800949"><span id="local-6989586621680800951"><span id="local-6989586621680800953"><span id="local-6989586621680800955"><span id="local-6989586621680800957"><span id="local-6989586621680800959"><span id="local-6989586621680800961"><span id="local-6989586621680800963"><span id="local-6989586621680800968"><span class="annot"><a href="../../base/src/Data.Data.html#Data"><span class="hs-identifier hs-type">Data</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span></span></span></span></span></span></span></span></span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-525"></span><span>  </span><span class="hs-comment">-- don't traverse?</span><span>
</span><span id="line-526"></span><span>  </span><span id="local-6989586621680800943"><span class="annot"><span class="annottext">toConstr :: Name -&gt; Constr
</span><a href="../../base/src/Data.Data.html#toConstr"><span class="hs-identifier hs-var hs-var hs-var hs-var">toConstr</span></a></span></span><span> </span><span class="annot"><span class="annottext">Name
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Constr
</span><a href="GHC.Utils.Misc.html#abstractConstr"><span class="hs-identifier hs-var">abstractConstr</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Name&quot;</span></span><span>
</span><span id="line-527"></span><span>  </span><span id="local-6989586621680800938"><span class="annot"><span class="annottext">gunfold :: forall (c :: * -&gt; *).
(forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
-&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c Name
</span><a href="../../base/src/Data.Data.html#gunfold"><span class="hs-identifier hs-var hs-var hs-var hs-var">gunfold</span></a></span></span><span> </span><span class="annot"><span class="annottext">forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">forall r. r -&gt; c r
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Constr -&gt; c Name
forall a. HasCallStack =&gt; String -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;gunfold&quot;</span></span><span>
</span><span id="line-528"></span><span>  </span><span id="local-6989586621680800935"><span class="annot"><span class="annottext">dataTypeOf :: Name -&gt; DataType
</span><a href="../../base/src/Data.Data.html#dataTypeOf"><span class="hs-identifier hs-var hs-var hs-var hs-var">dataTypeOf</span></a></span></span><span> </span><span class="annot"><span class="annottext">Name
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; DataType
</span><a href="../../base/src/Data.Data.html#mkNoRepType"><span class="hs-identifier hs-var">mkNoRepType</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Name&quot;</span></span><span>
</span><span id="line-529"></span><span>
</span><span id="line-530"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
\subsection{Binary}
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-537"></span><span>
</span><span id="line-538"></span><span class="hs-comment">-- | Assumes that the 'Name' is a non-binding one. See</span><span>
</span><span id="line-539"></span><span class="hs-comment">-- 'GHC.Iface.Syntax.putIfaceTopBndr' and 'GHC.Iface.Syntax.getIfaceTopBndr' for</span><span>
</span><span id="line-540"></span><span class="hs-comment">-- serializing binding 'Name's. See 'UserData' for the rationale for this</span><span>
</span><span id="line-541"></span><span class="hs-comment">-- distinction.</span><span>
</span><span id="line-542"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680800930"><span class="annot"><a href="GHC.Utils.Binary.html#Binary"><span class="hs-identifier hs-type">Binary</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-543"></span><span>   </span><span id="local-6989586621680800927"><span class="annot"><span class="annottext">put_ :: BinHandle -&gt; Name -&gt; IO ()
</span><a href="GHC.Utils.Binary.html#put_"><span class="hs-identifier hs-var hs-var hs-var hs-var">put_</span></a></span></span><span> </span><span id="local-6989586621680800925"><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680800925"><span class="hs-identifier hs-var">bh</span></a></span></span><span> </span><span id="local-6989586621680800924"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680800924"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-544"></span><span>      </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">BinHandle -&gt; UserData
</span><a href="GHC.Utils.Binary.html#getUserData"><span class="hs-identifier hs-var">getUserData</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680800925"><span class="hs-identifier hs-var">bh</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-545"></span><span>        </span><span class="annot"><a href="GHC.Utils.Binary.html#UserData"><span class="hs-identifier hs-type">UserData</span></a></span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ud_put_nonbinding_name :: UserData -&gt; BinHandle -&gt; Name -&gt; IO ()
</span><a href="GHC.Utils.Binary.html#ud_put_nonbinding_name"><span class="hs-identifier hs-var">ud_put_nonbinding_name</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680800920"><span class="annot"><span class="annottext">BinHandle -&gt; Name -&gt; IO ()
</span><a href="#local-6989586621680800920"><span class="hs-identifier hs-var">put_name</span></a></span></span><span> </span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">BinHandle -&gt; Name -&gt; IO ()
</span><a href="#local-6989586621680800920"><span class="hs-identifier hs-var">put_name</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680800925"><span class="hs-identifier hs-var">bh</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680800924"><span class="hs-identifier hs-var">name</span></a></span><span>
</span><span id="line-546"></span><span>
</span><span id="line-547"></span><span>   </span><span id="local-6989586621680800919"><span class="annot"><span class="annottext">get :: BinHandle -&gt; IO Name
</span><a href="GHC.Utils.Binary.html#get"><span class="hs-identifier hs-var hs-var hs-var hs-var">get</span></a></span></span><span> </span><span id="local-6989586621680800917"><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680800917"><span class="hs-identifier hs-var">bh</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-548"></span><span>      </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">BinHandle -&gt; UserData
</span><a href="GHC.Utils.Binary.html#getUserData"><span class="hs-identifier hs-var">getUserData</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680800917"><span class="hs-identifier hs-var">bh</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-549"></span><span>        </span><span class="annot"><a href="GHC.Utils.Binary.html#UserData"><span class="hs-identifier hs-type">UserData</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ud_get_name :: UserData -&gt; BinHandle -&gt; IO Name
</span><a href="GHC.Utils.Binary.html#ud_get_name"><span class="hs-identifier hs-var">ud_get_name</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680800915"><span class="annot"><span class="annottext">BinHandle -&gt; IO Name
</span><a href="#local-6989586621680800915"><span class="hs-identifier hs-var">get_name</span></a></span></span><span> </span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">BinHandle -&gt; IO Name
</span><a href="#local-6989586621680800915"><span class="hs-identifier hs-var">get_name</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680800917"><span class="hs-identifier hs-var">bh</span></a></span><span>
</span><span id="line-550"></span><span>
</span><span id="line-551"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
\subsection{Pretty printing}
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-558"></span><span>
</span><span id="line-559"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680800912"><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-560"></span><span>    </span><span id="local-6989586621680800911"><span class="annot"><span class="annottext">ppr :: Name -&gt; SDoc
</span><a href="#local-6989586621680800911"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span id="local-6989586621680800910"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680800910"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; SDoc
</span><a href="GHC.Types.Name.html#pprName"><span class="hs-identifier hs-var">pprName</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680800910"><span class="hs-identifier hs-var">name</span></a></span><span>
</span><span id="line-561"></span><span>
</span><span id="line-562"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680800902"><span class="annot"><a href="GHC.Utils.Outputable.html#OutputableBndr"><span class="hs-identifier hs-type">OutputableBndr</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-563"></span><span>    </span><span id="local-6989586621680800900"><span class="annot"><span class="annottext">pprBndr :: BindingSite -&gt; Name -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#pprBndr"><span class="hs-identifier hs-var hs-var hs-var hs-var">pprBndr</span></a></span></span><span> </span><span class="annot"><span class="annottext">BindingSite
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680800898"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680800898"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; SDoc
</span><a href="GHC.Types.Name.html#pprName"><span class="hs-identifier hs-var">pprName</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680800898"><span class="hs-identifier hs-var">name</span></a></span><span>
</span><span id="line-564"></span><span>    </span><span id="local-6989586621680800895"><span class="annot"><span class="annottext">pprInfixOcc :: Name -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#pprInfixOcc"><span class="hs-identifier hs-var hs-var hs-var hs-var">pprInfixOcc</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; SDoc
forall a. (Outputable a, NamedThing a) =&gt; a -&gt; SDoc
</span><a href="GHC.Types.Name.html#pprInfixName"><span class="hs-identifier hs-var">pprInfixName</span></a></span><span>
</span><span id="line-565"></span><span>    </span><span id="local-6989586621680800892"><span class="annot"><span class="annottext">pprPrefixOcc :: Name -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#pprPrefixOcc"><span class="hs-identifier hs-var hs-var hs-var hs-var">pprPrefixOcc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; SDoc
forall a. NamedThing a =&gt; a -&gt; SDoc
</span><a href="GHC.Types.Name.html#pprPrefixName"><span class="hs-identifier hs-var">pprPrefixName</span></a></span><span>
</span><span id="line-566"></span><span>
</span><span id="line-567"></span><span class="annot"><a href="GHC.Types.Name.html#pprName"><span class="hs-identifier hs-type">pprName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-568"></span><span id="pprName"><span class="annot"><span class="annottext">pprName :: Name -&gt; SDoc
</span><a href="GHC.Types.Name.html#pprName"><span class="hs-identifier hs-var hs-var">pprName</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-special">{</span><span class="annot"><span class="annottext">n_sort :: Name -&gt; NameSort
</span><a href="GHC.Types.Name.html#n_sort"><span class="hs-identifier hs-var">n_sort</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680800890"><span class="annot"><span class="annottext">NameSort
</span><a href="#local-6989586621680800890"><span class="hs-identifier hs-var">sort</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">n_uniq :: Name -&gt; Unique
</span><a href="GHC.Types.Name.html#n_uniq"><span class="hs-identifier hs-var">n_uniq</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680800889"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680800889"><span class="hs-identifier hs-var">uniq</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">n_occ :: Name -&gt; OccName
</span><a href="GHC.Types.Name.html#n_occ"><span class="hs-identifier hs-var">n_occ</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680800888"><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680800888"><span class="hs-identifier hs-var">occ</span></a></span></span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-569"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(PprStyle -&gt; SDoc) -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#getPprStyle"><span class="hs-identifier hs-var">getPprStyle</span></a></span><span> </span><span class="annot"><span class="annottext">((PprStyle -&gt; SDoc) -&gt; SDoc) -&gt; (PprStyle -&gt; SDoc) -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621680800886"><span class="annot"><span class="annottext">PprStyle
</span><a href="#local-6989586621680800886"><span class="hs-identifier hs-var">sty</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-570"></span><span>    </span><span class="annot"><span class="annottext">(Bool -&gt; SDoc) -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#getPprDebug"><span class="hs-identifier hs-var">getPprDebug</span></a></span><span> </span><span class="annot"><span class="annottext">((Bool -&gt; SDoc) -&gt; SDoc) -&gt; (Bool -&gt; SDoc) -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621680800884"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680800884"><span class="hs-identifier hs-var">debug</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-571"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">NameSort
</span><a href="#local-6989586621680800890"><span class="hs-identifier hs-var">sort</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-572"></span><span>      </span><span class="annot"><a href="GHC.Types.Name.html#WiredIn"><span class="hs-identifier hs-type">WiredIn</span></a></span><span> </span><span id="local-6989586621680800883"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680800883"><span class="hs-identifier hs-var">mod</span></a></span></span><span> </span><span class="annot"><span class="annottext">TyThing
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680800882"><span class="annot"><span class="annottext">BuiltInSyntax
</span><a href="#local-6989586621680800882"><span class="hs-identifier hs-var">builtin</span></a></span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
-&gt; PprStyle
-&gt; Unique
-&gt; Module
-&gt; OccName
-&gt; Bool
-&gt; BuiltInSyntax
-&gt; SDoc
</span><a href="GHC.Types.Name.html#pprExternal"><span class="hs-identifier hs-var">pprExternal</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680800884"><span class="hs-identifier hs-var">debug</span></a></span><span> </span><span class="annot"><span class="annottext">PprStyle
</span><a href="#local-6989586621680800886"><span class="hs-identifier hs-var">sty</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680800889"><span class="hs-identifier hs-var">uniq</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680800883"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680800888"><span class="hs-identifier hs-var">occ</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>  </span><span class="annot"><span class="annottext">BuiltInSyntax
</span><a href="#local-6989586621680800882"><span class="hs-identifier hs-var">builtin</span></a></span><span>
</span><span id="line-573"></span><span>      </span><span class="annot"><a href="GHC.Types.Name.html#External"><span class="hs-identifier hs-type">External</span></a></span><span> </span><span id="local-6989586621680800880"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680800880"><span class="hs-identifier hs-var">mod</span></a></span></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
-&gt; PprStyle
-&gt; Unique
-&gt; Module
-&gt; OccName
-&gt; Bool
-&gt; BuiltInSyntax
-&gt; SDoc
</span><a href="GHC.Types.Name.html#pprExternal"><span class="hs-identifier hs-var">pprExternal</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680800884"><span class="hs-identifier hs-var">debug</span></a></span><span> </span><span class="annot"><span class="annottext">PprStyle
</span><a href="#local-6989586621680800886"><span class="hs-identifier hs-var">sty</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680800889"><span class="hs-identifier hs-var">uniq</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680800880"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680800888"><span class="hs-identifier hs-var">occ</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="annot"><span class="annottext">BuiltInSyntax
</span><a href="GHC.Types.Name.html#UserSyntax"><span class="hs-identifier hs-var">UserSyntax</span></a></span><span>
</span><span id="line-574"></span><span>      </span><span class="annot"><span class="annottext">NameSort
</span><a href="GHC.Types.Name.html#System"><span class="hs-identifier hs-var">System</span></a></span><span>                  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; PprStyle -&gt; Unique -&gt; OccName -&gt; SDoc
</span><a href="GHC.Types.Name.html#pprSystem"><span class="hs-identifier hs-var">pprSystem</span></a></span><span>   </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680800884"><span class="hs-identifier hs-var">debug</span></a></span><span> </span><span class="annot"><span class="annottext">PprStyle
</span><a href="#local-6989586621680800886"><span class="hs-identifier hs-var">sty</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680800889"><span class="hs-identifier hs-var">uniq</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680800888"><span class="hs-identifier hs-var">occ</span></a></span><span>
</span><span id="line-575"></span><span>      </span><span class="annot"><span class="annottext">NameSort
</span><a href="GHC.Types.Name.html#Internal"><span class="hs-identifier hs-var">Internal</span></a></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; PprStyle -&gt; Unique -&gt; OccName -&gt; SDoc
</span><a href="GHC.Types.Name.html#pprInternal"><span class="hs-identifier hs-var">pprInternal</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680800884"><span class="hs-identifier hs-var">debug</span></a></span><span> </span><span class="annot"><span class="annottext">PprStyle
</span><a href="#local-6989586621680800886"><span class="hs-identifier hs-var">sty</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680800889"><span class="hs-identifier hs-var">uniq</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680800888"><span class="hs-identifier hs-var">occ</span></a></span><span>
</span><span id="line-576"></span><span>
</span><span id="line-577"></span><span class="hs-comment">-- | Print the string of Name unqualifiedly directly.</span><span>
</span><span id="line-578"></span><span class="annot"><a href="GHC.Types.Name.html#pprNameUnqualified"><span class="hs-identifier hs-type">pprNameUnqualified</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-579"></span><span id="pprNameUnqualified"><span class="annot"><span class="annottext">pprNameUnqualified :: Name -&gt; SDoc
</span><a href="GHC.Types.Name.html#pprNameUnqualified"><span class="hs-identifier hs-var hs-var">pprNameUnqualified</span></a></span></span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">n_occ :: Name -&gt; OccName
</span><a href="GHC.Types.Name.html#n_occ"><span class="hs-identifier hs-var">n_occ</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680800877"><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680800877"><span class="hs-identifier hs-var">occ</span></a></span></span><span> </span><span class="hs-special">}</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OccName -&gt; SDoc
</span><a href="GHC.Types.Name.html#ppr_occ_name"><span class="hs-identifier hs-var">ppr_occ_name</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680800877"><span class="hs-identifier hs-var">occ</span></a></span><span>
</span><span id="line-580"></span><span>
</span><span id="line-581"></span><span class="annot"><a href="GHC.Types.Name.html#pprExternal"><span class="hs-identifier hs-type">pprExternal</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#PprStyle"><span class="hs-identifier hs-type">PprStyle</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#Module"><span class="hs-identifier hs-type">Module</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#OccName"><span class="hs-identifier hs-type">OccName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#BuiltInSyntax"><span class="hs-identifier hs-type">BuiltInSyntax</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-582"></span><span id="pprExternal"><span class="annot"><span class="annottext">pprExternal :: Bool
-&gt; PprStyle
-&gt; Unique
-&gt; Module
-&gt; OccName
-&gt; Bool
-&gt; BuiltInSyntax
-&gt; SDoc
</span><a href="GHC.Types.Name.html#pprExternal"><span class="hs-identifier hs-var hs-var">pprExternal</span></a></span></span><span> </span><span id="local-6989586621680800875"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680800875"><span class="hs-identifier hs-var">debug</span></a></span></span><span> </span><span id="local-6989586621680800874"><span class="annot"><span class="annottext">PprStyle
</span><a href="#local-6989586621680800874"><span class="hs-identifier hs-var">sty</span></a></span></span><span> </span><span id="local-6989586621680800873"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680800873"><span class="hs-identifier hs-var">uniq</span></a></span></span><span> </span><span id="local-6989586621680800872"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680800872"><span class="hs-identifier hs-var">mod</span></a></span></span><span> </span><span id="local-6989586621680800871"><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680800871"><span class="hs-identifier hs-var">occ</span></a></span></span><span> </span><span id="local-6989586621680800870"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680800870"><span class="hs-identifier hs-var">is_wired</span></a></span></span><span> </span><span id="local-6989586621680800869"><span class="annot"><span class="annottext">BuiltInSyntax
</span><a href="#local-6989586621680800869"><span class="hs-identifier hs-var">is_builtin</span></a></span></span><span>
</span><span id="line-583"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">PprStyle -&gt; Bool
</span><a href="GHC.Utils.Outputable.html#codeStyle"><span class="hs-identifier hs-var">codeStyle</span></a></span><span> </span><span class="annot"><span class="annottext">PprStyle
</span><a href="#local-6989586621680800874"><span class="hs-identifier hs-var">sty</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Module -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680800872"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'_'</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">OccName -&gt; SDoc
</span><a href="GHC.Types.Name.html#ppr_z_occ_name"><span class="hs-identifier hs-var">ppr_z_occ_name</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680800871"><span class="hs-identifier hs-var">occ</span></a></span><span>
</span><span id="line-584"></span><span>        </span><span class="hs-comment">-- In code style, always qualify</span><span>
</span><span id="line-585"></span><span>        </span><span class="hs-comment">-- ToDo: maybe we could print all wired-in things unqualified</span><span>
</span><span id="line-586"></span><span>        </span><span class="hs-comment">--       in code style, to reduce symbol table bloat?</span><span>
</span><span id="line-587"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680800875"><span class="hs-identifier hs-var">debug</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621680800864"><span class="hs-identifier hs-var">pp_mod</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">OccName -&gt; SDoc
</span><a href="GHC.Types.Name.html#ppr_occ_name"><span class="hs-identifier hs-var">ppr_occ_name</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680800871"><span class="hs-identifier hs-var">occ</span></a></span><span>
</span><span id="line-588"></span><span>                     </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#braces"><span class="hs-identifier hs-var">braces</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#hsep"><span class="hs-identifier hs-var">hsep</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680800870"><span class="hs-identifier hs-var">is_wired</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;(w)&quot;</span></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#empty"><span class="hs-identifier hs-var">empty</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-589"></span><span>                                      </span><span class="annot"><span class="annottext">NameSpace -&gt; SDoc
</span><a href="GHC.Types.Name.Occurrence.html#pprNameSpaceBrief"><span class="hs-identifier hs-var">pprNameSpaceBrief</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OccName -&gt; NameSpace
</span><a href="GHC.Types.Name.Occurrence.html#occNameSpace"><span class="hs-identifier hs-var hs-var">occNameSpace</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680800871"><span class="hs-identifier hs-var">occ</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-590"></span><span>                                      </span><span class="annot"><span class="annottext">Unique -&gt; SDoc
</span><a href="GHC.Types.Name.html#pprUnique"><span class="hs-identifier hs-var">pprUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680800873"><span class="hs-identifier hs-var">uniq</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-591"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BuiltInSyntax
</span><a href="GHC.Types.Name.html#BuiltInSyntax"><span class="hs-identifier hs-var">BuiltInSyntax</span></a></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">BuiltInSyntax
</span><a href="#local-6989586621680800869"><span class="hs-identifier hs-var">is_builtin</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OccName -&gt; SDoc
</span><a href="GHC.Types.Name.html#ppr_occ_name"><span class="hs-identifier hs-var">ppr_occ_name</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680800871"><span class="hs-identifier hs-var">occ</span></a></span><span>  </span><span class="hs-comment">-- Never qualify builtin syntax</span><span>
</span><span id="line-592"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>                   </span><span class="hs-glyph">=</span><span>
</span><span id="line-593"></span><span>        </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Module -&gt; Bool
forall u. GenModule (GenUnit u) -&gt; Bool
</span><a href="GHC.Unit.Module.html#isHoleModule"><span class="hs-identifier hs-var">isHoleModule</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680800872"><span class="hs-identifier hs-var">mod</span></a></span><span>
</span><span id="line-594"></span><span>            </span><span class="hs-keyword">then</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">PprStyle -&gt; QueryQualifyName
</span><a href="GHC.Utils.Outputable.html#qualName"><span class="hs-identifier hs-var">qualName</span></a></span><span> </span><span class="annot"><span class="annottext">PprStyle
</span><a href="#local-6989586621680800874"><span class="hs-identifier hs-var">sty</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680800872"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680800871"><span class="hs-identifier hs-var">occ</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-595"></span><span>                    </span><span class="annot"><span class="annottext">QualifyName
</span><a href="GHC.Utils.Outputable.html#NameUnqual"><span class="hs-identifier hs-var">NameUnqual</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">OccName -&gt; SDoc
</span><a href="GHC.Types.Name.html#ppr_occ_name"><span class="hs-identifier hs-var">ppr_occ_name</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680800871"><span class="hs-identifier hs-var">occ</span></a></span><span>
</span><span id="line-596"></span><span>                    </span><span class="annot"><span class="annottext">QualifyName
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#braces"><span class="hs-identifier hs-var">braces</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModuleName -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Module -&gt; ModuleName
forall unit. GenModule unit -&gt; ModuleName
</span><a href="GHC.Unit.Types.html#moduleName"><span class="hs-identifier hs-var hs-var">moduleName</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680800872"><span class="hs-identifier hs-var">mod</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#dot"><span class="hs-identifier hs-var">dot</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">OccName -&gt; SDoc
</span><a href="GHC.Types.Name.html#ppr_occ_name"><span class="hs-identifier hs-var">ppr_occ_name</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680800871"><span class="hs-identifier hs-var">occ</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-597"></span><span>            </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">PprStyle -&gt; Module -&gt; OccName -&gt; SDoc
</span><a href="GHC.Types.Name.html#pprModulePrefix"><span class="hs-identifier hs-var">pprModulePrefix</span></a></span><span> </span><span class="annot"><span class="annottext">PprStyle
</span><a href="#local-6989586621680800874"><span class="hs-identifier hs-var">sty</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680800872"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680800871"><span class="hs-identifier hs-var">occ</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">OccName -&gt; SDoc
</span><a href="GHC.Types.Name.html#ppr_occ_name"><span class="hs-identifier hs-var">ppr_occ_name</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680800871"><span class="hs-identifier hs-var">occ</span></a></span><span>
</span><span id="line-598"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-599"></span><span>    </span><span id="local-6989586621680800864"><span class="annot"><span class="annottext">pp_mod :: SDoc
</span><a href="#local-6989586621680800864"><span class="hs-identifier hs-var hs-var">pp_mod</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(SDocContext -&gt; Bool) -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppUnlessOption"><span class="hs-identifier hs-var">ppUnlessOption</span></a></span><span> </span><span class="annot"><span class="annottext">SDocContext -&gt; Bool
</span><a href="GHC.Utils.Outputable.html#sdocSuppressModulePrefixes"><span class="hs-identifier hs-var hs-var">sdocSuppressModulePrefixes</span></a></span><span>
</span><span id="line-600"></span><span>               </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Module -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680800872"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#dot"><span class="hs-identifier hs-var">dot</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-601"></span><span>
</span><span id="line-602"></span><span class="annot"><a href="GHC.Types.Name.html#pprInternal"><span class="hs-identifier hs-type">pprInternal</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#PprStyle"><span class="hs-identifier hs-type">PprStyle</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#OccName"><span class="hs-identifier hs-type">OccName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-603"></span><span id="pprInternal"><span class="annot"><span class="annottext">pprInternal :: Bool -&gt; PprStyle -&gt; Unique -&gt; OccName -&gt; SDoc
</span><a href="GHC.Types.Name.html#pprInternal"><span class="hs-identifier hs-var hs-var">pprInternal</span></a></span></span><span> </span><span id="local-6989586621680800852"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680800852"><span class="hs-identifier hs-var">debug</span></a></span></span><span> </span><span id="local-6989586621680800851"><span class="annot"><span class="annottext">PprStyle
</span><a href="#local-6989586621680800851"><span class="hs-identifier hs-var">sty</span></a></span></span><span> </span><span id="local-6989586621680800850"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680800850"><span class="hs-identifier hs-var">uniq</span></a></span></span><span> </span><span id="local-6989586621680800849"><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680800849"><span class="hs-identifier hs-var">occ</span></a></span></span><span>
</span><span id="line-604"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">PprStyle -&gt; Bool
</span><a href="GHC.Utils.Outputable.html#codeStyle"><span class="hs-identifier hs-var">codeStyle</span></a></span><span> </span><span class="annot"><span class="annottext">PprStyle
</span><a href="#local-6989586621680800851"><span class="hs-identifier hs-var">sty</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Unique -&gt; SDoc
</span><a href="GHC.Types.Unique.html#pprUniqueAlways"><span class="hs-identifier hs-var">pprUniqueAlways</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680800850"><span class="hs-identifier hs-var">uniq</span></a></span><span>
</span><span id="line-605"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680800852"><span class="hs-identifier hs-var">debug</span></a></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OccName -&gt; SDoc
</span><a href="GHC.Types.Name.html#ppr_occ_name"><span class="hs-identifier hs-var">ppr_occ_name</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680800849"><span class="hs-identifier hs-var">occ</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#braces"><span class="hs-identifier hs-var">braces</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#hsep"><span class="hs-identifier hs-var">hsep</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">NameSpace -&gt; SDoc
</span><a href="GHC.Types.Name.Occurrence.html#pprNameSpaceBrief"><span class="hs-identifier hs-var">pprNameSpaceBrief</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OccName -&gt; NameSpace
</span><a href="GHC.Types.Name.Occurrence.html#occNameSpace"><span class="hs-identifier hs-var hs-var">occNameSpace</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680800849"><span class="hs-identifier hs-var">occ</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-606"></span><span>                                                       </span><span class="annot"><span class="annottext">Unique -&gt; SDoc
</span><a href="GHC.Types.Name.html#pprUnique"><span class="hs-identifier hs-var">pprUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680800850"><span class="hs-identifier hs-var">uniq</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-607"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">PprStyle -&gt; Bool
</span><a href="GHC.Utils.Outputable.html#dumpStyle"><span class="hs-identifier hs-var">dumpStyle</span></a></span><span> </span><span class="annot"><span class="annottext">PprStyle
</span><a href="#local-6989586621680800851"><span class="hs-identifier hs-var">sty</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OccName -&gt; SDoc
</span><a href="GHC.Types.Name.html#ppr_occ_name"><span class="hs-identifier hs-var">ppr_occ_name</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680800849"><span class="hs-identifier hs-var">occ</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Unique -&gt; SDoc
</span><a href="GHC.Types.Name.html#ppr_underscore_unique"><span class="hs-identifier hs-var">ppr_underscore_unique</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680800850"><span class="hs-identifier hs-var">uniq</span></a></span><span>
</span><span id="line-608"></span><span>                        </span><span class="hs-comment">-- For debug dumps, we're not necessarily dumping</span><span>
</span><span id="line-609"></span><span>                        </span><span class="hs-comment">-- tidied code, so we need to print the uniques.</span><span>
</span><span id="line-610"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OccName -&gt; SDoc
</span><a href="GHC.Types.Name.html#ppr_occ_name"><span class="hs-identifier hs-var">ppr_occ_name</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680800849"><span class="hs-identifier hs-var">occ</span></a></span><span>   </span><span class="hs-comment">-- User style</span><span>
</span><span id="line-611"></span><span>
</span><span id="line-612"></span><span class="hs-comment">-- Like Internal, except that we only omit the unique in Iface style</span><span>
</span><span id="line-613"></span><span class="annot"><a href="GHC.Types.Name.html#pprSystem"><span class="hs-identifier hs-type">pprSystem</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#PprStyle"><span class="hs-identifier hs-type">PprStyle</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#OccName"><span class="hs-identifier hs-type">OccName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-614"></span><span id="pprSystem"><span class="annot"><span class="annottext">pprSystem :: Bool -&gt; PprStyle -&gt; Unique -&gt; OccName -&gt; SDoc
</span><a href="GHC.Types.Name.html#pprSystem"><span class="hs-identifier hs-var hs-var">pprSystem</span></a></span></span><span> </span><span id="local-6989586621680800845"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680800845"><span class="hs-identifier hs-var">debug</span></a></span></span><span> </span><span id="local-6989586621680800844"><span class="annot"><span class="annottext">PprStyle
</span><a href="#local-6989586621680800844"><span class="hs-identifier hs-var">sty</span></a></span></span><span> </span><span id="local-6989586621680800843"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680800843"><span class="hs-identifier hs-var">uniq</span></a></span></span><span> </span><span id="local-6989586621680800842"><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680800842"><span class="hs-identifier hs-var">occ</span></a></span></span><span>
</span><span id="line-615"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">PprStyle -&gt; Bool
</span><a href="GHC.Utils.Outputable.html#codeStyle"><span class="hs-identifier hs-var">codeStyle</span></a></span><span> </span><span class="annot"><span class="annottext">PprStyle
</span><a href="#local-6989586621680800844"><span class="hs-identifier hs-var">sty</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Unique -&gt; SDoc
</span><a href="GHC.Types.Unique.html#pprUniqueAlways"><span class="hs-identifier hs-var">pprUniqueAlways</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680800843"><span class="hs-identifier hs-var">uniq</span></a></span><span>
</span><span id="line-616"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680800845"><span class="hs-identifier hs-var">debug</span></a></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OccName -&gt; SDoc
</span><a href="GHC.Types.Name.html#ppr_occ_name"><span class="hs-identifier hs-var">ppr_occ_name</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680800842"><span class="hs-identifier hs-var">occ</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Unique -&gt; SDoc
</span><a href="GHC.Types.Name.html#ppr_underscore_unique"><span class="hs-identifier hs-var">ppr_underscore_unique</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680800843"><span class="hs-identifier hs-var">uniq</span></a></span><span>
</span><span id="line-617"></span><span>                     </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#braces"><span class="hs-identifier hs-var">braces</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NameSpace -&gt; SDoc
</span><a href="GHC.Types.Name.Occurrence.html#pprNameSpaceBrief"><span class="hs-identifier hs-var">pprNameSpaceBrief</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OccName -&gt; NameSpace
</span><a href="GHC.Types.Name.Occurrence.html#occNameSpace"><span class="hs-identifier hs-var hs-var">occNameSpace</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680800842"><span class="hs-identifier hs-var">occ</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-618"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OccName -&gt; SDoc
</span><a href="GHC.Types.Name.html#ppr_occ_name"><span class="hs-identifier hs-var">ppr_occ_name</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680800842"><span class="hs-identifier hs-var">occ</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Unique -&gt; SDoc
</span><a href="GHC.Types.Name.html#ppr_underscore_unique"><span class="hs-identifier hs-var">ppr_underscore_unique</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680800843"><span class="hs-identifier hs-var">uniq</span></a></span><span>
</span><span id="line-619"></span><span>                                </span><span class="hs-comment">-- If the tidy phase hasn't run, the OccName</span><span>
</span><span id="line-620"></span><span>                                </span><span class="hs-comment">-- is unlikely to be informative (like 's'),</span><span>
</span><span id="line-621"></span><span>                                </span><span class="hs-comment">-- so print the unique</span><span>
</span><span id="line-622"></span><span>
</span><span id="line-623"></span><span>
</span><span id="line-624"></span><span class="annot"><a href="GHC.Types.Name.html#pprModulePrefix"><span class="hs-identifier hs-type">pprModulePrefix</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#PprStyle"><span class="hs-identifier hs-type">PprStyle</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#Module"><span class="hs-identifier hs-type">Module</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#OccName"><span class="hs-identifier hs-type">OccName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-625"></span><span class="hs-comment">-- Print the &quot;M.&quot; part of a name, based on whether it's in scope or not</span><span>
</span><span id="line-626"></span><span class="hs-comment">-- See Note [Printing original names] in GHC.Driver.Types</span><span>
</span><span id="line-627"></span><span id="pprModulePrefix"><span class="annot"><span class="annottext">pprModulePrefix :: PprStyle -&gt; Module -&gt; OccName -&gt; SDoc
</span><a href="GHC.Types.Name.html#pprModulePrefix"><span class="hs-identifier hs-var hs-var">pprModulePrefix</span></a></span></span><span> </span><span id="local-6989586621680800841"><span class="annot"><span class="annottext">PprStyle
</span><a href="#local-6989586621680800841"><span class="hs-identifier hs-var">sty</span></a></span></span><span> </span><span id="local-6989586621680800840"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680800840"><span class="hs-identifier hs-var">mod</span></a></span></span><span> </span><span id="local-6989586621680800839"><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680800839"><span class="hs-identifier hs-var">occ</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(SDocContext -&gt; Bool) -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppUnlessOption"><span class="hs-identifier hs-var">ppUnlessOption</span></a></span><span> </span><span class="annot"><span class="annottext">SDocContext -&gt; Bool
</span><a href="GHC.Utils.Outputable.html#sdocSuppressModulePrefixes"><span class="hs-identifier hs-var hs-var">sdocSuppressModulePrefixes</span></a></span><span> </span><span class="annot"><span class="annottext">(SDoc -&gt; SDoc) -&gt; SDoc -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-628"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">PprStyle -&gt; QueryQualifyName
</span><a href="GHC.Utils.Outputable.html#qualName"><span class="hs-identifier hs-var">qualName</span></a></span><span> </span><span class="annot"><span class="annottext">PprStyle
</span><a href="#local-6989586621680800841"><span class="hs-identifier hs-var">sty</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680800840"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680800839"><span class="hs-identifier hs-var">occ</span></a></span><span> </span><span class="hs-keyword">of</span><span>              </span><span class="hs-comment">-- See Outputable.QualifyName:</span><span>
</span><span id="line-629"></span><span>      </span><span class="annot"><a href="GHC.Utils.Outputable.html#NameQual"><span class="hs-identifier hs-type">NameQual</span></a></span><span> </span><span id="local-6989586621680800837"><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621680800837"><span class="hs-identifier hs-var">modname</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ModuleName -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621680800837"><span class="hs-identifier hs-var">modname</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#dot"><span class="hs-identifier hs-var">dot</span></a></span><span>       </span><span class="hs-comment">-- Name is in scope</span><span>
</span><span id="line-630"></span><span>      </span><span class="annot"><span class="annottext">QualifyName
</span><a href="GHC.Utils.Outputable.html#NameNotInScope1"><span class="hs-identifier hs-var">NameNotInScope1</span></a></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Module -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680800840"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#dot"><span class="hs-identifier hs-var">dot</span></a></span><span>           </span><span class="hs-comment">-- Not in scope</span><span>
</span><span id="line-631"></span><span>      </span><span class="annot"><span class="annottext">QualifyName
</span><a href="GHC.Utils.Outputable.html#NameNotInScope2"><span class="hs-identifier hs-var">NameNotInScope2</span></a></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Unit -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Module -&gt; Unit
forall unit. GenModule unit -&gt; unit
</span><a href="GHC.Unit.Types.html#moduleUnit"><span class="hs-identifier hs-var hs-var">moduleUnit</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680800840"><span class="hs-identifier hs-var">mod</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#colon"><span class="hs-identifier hs-var">colon</span></a></span><span>     </span><span class="hs-comment">-- Module not in</span><span>
</span><span id="line-632"></span><span>                          </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Module -&gt; ModuleName
forall unit. GenModule unit -&gt; ModuleName
</span><a href="GHC.Unit.Types.html#moduleName"><span class="hs-identifier hs-var hs-var">moduleName</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680800840"><span class="hs-identifier hs-var">mod</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#dot"><span class="hs-identifier hs-var">dot</span></a></span><span>          </span><span class="hs-comment">-- scope either</span><span>
</span><span id="line-633"></span><span>      </span><span class="annot"><span class="annottext">QualifyName
</span><a href="GHC.Utils.Outputable.html#NameUnqual"><span class="hs-identifier hs-var">NameUnqual</span></a></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#empty"><span class="hs-identifier hs-var">empty</span></a></span><span>                   </span><span class="hs-comment">-- In scope unqualified</span><span>
</span><span id="line-634"></span><span>
</span><span id="line-635"></span><span class="annot"><a href="GHC.Types.Name.html#pprUnique"><span class="hs-identifier hs-type">pprUnique</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-636"></span><span class="hs-comment">-- Print a unique unless we are suppressing them</span><span>
</span><span id="line-637"></span><span id="pprUnique"><span class="annot"><span class="annottext">pprUnique :: Unique -&gt; SDoc
</span><a href="GHC.Types.Name.html#pprUnique"><span class="hs-identifier hs-var hs-var">pprUnique</span></a></span></span><span> </span><span id="local-6989586621680800833"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680800833"><span class="hs-identifier hs-var">uniq</span></a></span></span><span>
</span><span id="line-638"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(SDocContext -&gt; Bool) -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppUnlessOption"><span class="hs-identifier hs-var">ppUnlessOption</span></a></span><span> </span><span class="annot"><span class="annottext">SDocContext -&gt; Bool
</span><a href="GHC.Utils.Outputable.html#sdocSuppressUniques"><span class="hs-identifier hs-var hs-var">sdocSuppressUniques</span></a></span><span> </span><span class="annot"><span class="annottext">(SDoc -&gt; SDoc) -&gt; SDoc -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-639"></span><span>      </span><span class="annot"><span class="annottext">Unique -&gt; SDoc
</span><a href="GHC.Types.Unique.html#pprUniqueAlways"><span class="hs-identifier hs-var">pprUniqueAlways</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680800833"><span class="hs-identifier hs-var">uniq</span></a></span><span>
</span><span id="line-640"></span><span>
</span><span id="line-641"></span><span class="annot"><a href="GHC.Types.Name.html#ppr_underscore_unique"><span class="hs-identifier hs-type">ppr_underscore_unique</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-642"></span><span class="hs-comment">-- Print an underscore separating the name from its unique</span><span>
</span><span id="line-643"></span><span class="hs-comment">-- But suppress it if we aren't printing the uniques anyway</span><span>
</span><span id="line-644"></span><span id="ppr_underscore_unique"><span class="annot"><span class="annottext">ppr_underscore_unique :: Unique -&gt; SDoc
</span><a href="GHC.Types.Name.html#ppr_underscore_unique"><span class="hs-identifier hs-var hs-var">ppr_underscore_unique</span></a></span></span><span> </span><span id="local-6989586621680800831"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680800831"><span class="hs-identifier hs-var">uniq</span></a></span></span><span>
</span><span id="line-645"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(SDocContext -&gt; Bool) -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppUnlessOption"><span class="hs-identifier hs-var">ppUnlessOption</span></a></span><span> </span><span class="annot"><span class="annottext">SDocContext -&gt; Bool
</span><a href="GHC.Utils.Outputable.html#sdocSuppressUniques"><span class="hs-identifier hs-var hs-var">sdocSuppressUniques</span></a></span><span> </span><span class="annot"><span class="annottext">(SDoc -&gt; SDoc) -&gt; SDoc -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-646"></span><span>      </span><span class="annot"><span class="annottext">Char -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'_'</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Unique -&gt; SDoc
</span><a href="GHC.Types.Unique.html#pprUniqueAlways"><span class="hs-identifier hs-var">pprUniqueAlways</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680800831"><span class="hs-identifier hs-var">uniq</span></a></span><span>
</span><span id="line-647"></span><span>
</span><span id="line-648"></span><span class="annot"><a href="GHC.Types.Name.html#ppr_occ_name"><span class="hs-identifier hs-type">ppr_occ_name</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#OccName"><span class="hs-identifier hs-type">OccName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-649"></span><span id="ppr_occ_name"><span class="annot"><span class="annottext">ppr_occ_name :: OccName -&gt; SDoc
</span><a href="GHC.Types.Name.html#ppr_occ_name"><span class="hs-identifier hs-var hs-var">ppr_occ_name</span></a></span></span><span> </span><span id="local-6989586621680800830"><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680800830"><span class="hs-identifier hs-var">occ</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FastString -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ftext"><span class="hs-identifier hs-var">ftext</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OccName -&gt; FastString
</span><a href="GHC.Types.Name.Occurrence.html#occNameFS"><span class="hs-identifier hs-var hs-var">occNameFS</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680800830"><span class="hs-identifier hs-var">occ</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-650"></span><span>        </span><span class="hs-comment">-- Don't use pprOccName; instead, just print the string of the OccName;</span><span>
</span><span id="line-651"></span><span>        </span><span class="hs-comment">-- we print the namespace in the debug stuff above</span><span>
</span><span id="line-652"></span><span>
</span><span id="line-653"></span><span class="hs-comment">-- In code style, we Z-encode the strings.  The results of Z-encoding each FastString are</span><span>
</span><span id="line-654"></span><span class="hs-comment">-- cached behind the scenes in the FastString implementation.</span><span>
</span><span id="line-655"></span><span class="annot"><a href="GHC.Types.Name.html#ppr_z_occ_name"><span class="hs-identifier hs-type">ppr_z_occ_name</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#OccName"><span class="hs-identifier hs-type">OccName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-656"></span><span id="ppr_z_occ_name"><span class="annot"><span class="annottext">ppr_z_occ_name :: OccName -&gt; SDoc
</span><a href="GHC.Types.Name.html#ppr_z_occ_name"><span class="hs-identifier hs-var hs-var">ppr_z_occ_name</span></a></span></span><span> </span><span id="local-6989586621680800827"><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680800827"><span class="hs-identifier hs-var">occ</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FastZString -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ztext"><span class="hs-identifier hs-var">ztext</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FastString -&gt; FastZString
</span><a href="GHC.Data.FastString.html#zEncodeFS"><span class="hs-identifier hs-var">zEncodeFS</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OccName -&gt; FastString
</span><a href="GHC.Types.Name.Occurrence.html#occNameFS"><span class="hs-identifier hs-var hs-var">occNameFS</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680800827"><span class="hs-identifier hs-var">occ</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-657"></span><span>
</span><span id="line-658"></span><span class="hs-comment">-- Prints (if mod information is available) &quot;Defined at &lt;loc&gt;&quot; or</span><span>
</span><span id="line-659"></span><span class="hs-comment">--  &quot;Defined in &lt;mod&gt;&quot; information for a Name.</span><span>
</span><span id="line-660"></span><span class="annot"><a href="GHC.Types.Name.html#pprDefinedAt"><span class="hs-identifier hs-type">pprDefinedAt</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-661"></span><span id="pprDefinedAt"><span class="annot"><span class="annottext">pprDefinedAt :: Name -&gt; SDoc
</span><a href="GHC.Types.Name.html#pprDefinedAt"><span class="hs-identifier hs-var hs-var">pprDefinedAt</span></a></span></span><span> </span><span id="local-6989586621680800824"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680800824"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Defined&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; SDoc
</span><a href="GHC.Types.Name.html#pprNameDefnLoc"><span class="hs-identifier hs-var">pprNameDefnLoc</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680800824"><span class="hs-identifier hs-var">name</span></a></span><span>
</span><span id="line-662"></span><span>
</span><span id="line-663"></span><span class="annot"><a href="GHC.Types.Name.html#pprNameDefnLoc"><span class="hs-identifier hs-type">pprNameDefnLoc</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-664"></span><span class="hs-comment">-- Prints &quot;at &lt;loc&gt;&quot; or</span><span>
</span><span id="line-665"></span><span class="hs-comment">--     or &quot;in &lt;mod&gt;&quot; depending on what info is available</span><span>
</span><span id="line-666"></span><span id="pprNameDefnLoc"><span class="annot"><span class="annottext">pprNameDefnLoc :: Name -&gt; SDoc
</span><a href="GHC.Types.Name.html#pprNameDefnLoc"><span class="hs-identifier hs-var hs-var">pprNameDefnLoc</span></a></span></span><span> </span><span id="local-6989586621680800823"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680800823"><span class="hs-identifier hs-var">name</span></a></span></span><span>
</span><span id="line-667"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Name -&gt; SrcLoc
</span><a href="GHC.Types.Name.html#nameSrcLoc"><span class="hs-identifier hs-var">nameSrcLoc</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680800823"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-668"></span><span>         </span><span class="hs-comment">-- nameSrcLoc rather than nameSrcSpan</span><span>
</span><span id="line-669"></span><span>         </span><span class="hs-comment">-- It seems less cluttered to show a location</span><span>
</span><span id="line-670"></span><span>         </span><span class="hs-comment">-- rather than a span for the definition point</span><span>
</span><span id="line-671"></span><span>       </span><span class="annot"><a href="GHC.Types.SrcLoc.html#RealSrcLoc"><span class="hs-identifier hs-type">RealSrcLoc</span></a></span><span> </span><span id="local-6989586621680800821"><span class="annot"><span class="annottext">RealSrcLoc
</span><a href="#local-6989586621680800821"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="annot"><span class="annottext">Maybe BufPos
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;at&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">RealSrcLoc -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">RealSrcLoc
</span><a href="#local-6989586621680800821"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-672"></span><span>       </span><span class="annot"><a href="GHC.Types.SrcLoc.html#UnhelpfulLoc"><span class="hs-identifier hs-type">UnhelpfulLoc</span></a></span><span> </span><span id="local-6989586621680800819"><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680800819"><span class="hs-identifier hs-var">s</span></a></span></span><span>
</span><span id="line-673"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Bool
</span><a href="GHC.Types.Name.html#isInternalName"><span class="hs-identifier hs-var">isInternalName</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680800823"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">Name -&gt; Bool
</span><a href="GHC.Types.Name.html#isSystemName"><span class="hs-identifier hs-var">isSystemName</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680800823"><span class="hs-identifier hs-var">name</span></a></span><span>
</span><span id="line-674"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;at&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">FastString -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ftext"><span class="hs-identifier hs-var">ftext</span></a></span><span> </span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680800819"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-675"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-676"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;in&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#quotes"><span class="hs-identifier hs-var">quotes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Module -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Name -&gt; Module
Name -&gt; Module
</span><a href="GHC.Types.Name.html#nameModule"><span class="hs-identifier hs-var">nameModule</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680800823"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-677"></span><span>
</span><span id="line-678"></span><span>
</span><span id="line-679"></span><span class="hs-comment">-- | Get a string representation of a 'Name' that's unique and stable</span><span>
</span><span id="line-680"></span><span class="hs-comment">-- across recompilations. Used for deterministic generation of binds for</span><span>
</span><span id="line-681"></span><span class="hs-comment">-- derived instances.</span><span>
</span><span id="line-682"></span><span class="hs-comment">-- eg. &quot;$aeson_70dylHtv1FFGeai1IoxcQr$Data.Aeson.Types.Internal$String&quot;</span><span>
</span><span id="line-683"></span><span class="annot"><a href="GHC.Types.Name.html#nameStableString"><span class="hs-identifier hs-type">nameStableString</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-684"></span><span id="nameStableString"><span class="annot"><span class="annottext">nameStableString :: Name -&gt; String
</span><a href="GHC.Types.Name.html#nameStableString"><span class="hs-identifier hs-var hs-var">nameStableString</span></a></span></span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span class="hs-special">{</span><span id="local-6989586621680800814"><span id="local-6989586621680800815"><span id="local-6989586621680800816"><span id="local-6989586621680800817"><span class="annot"><span class="annottext">OccName
SrcSpan
Unique
NameSort
n_loc :: SrcSpan
n_uniq :: Unique
n_occ :: OccName
n_sort :: NameSort
n_loc :: Name -&gt; SrcSpan
n_uniq :: Name -&gt; Unique
n_occ :: Name -&gt; OccName
n_sort :: Name -&gt; NameSort
</span><a href="#local-6989586621680800814"><span class="hs-glyph hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">..</span></a></span></span></span></span></span><span class="hs-special">}</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-685"></span><span>  </span><span class="annot"><span class="annottext">NameSort -&gt; String
</span><a href="GHC.Types.Name.html#nameSortStableString"><span class="hs-identifier hs-var">nameSortStableString</span></a></span><span> </span><span class="annot"><span class="annottext">NameSort
</span><a href="#local-6989586621680800817"><span class="hs-identifier hs-var">n_sort</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;$&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">OccName -&gt; String
</span><a href="GHC.Types.Name.Occurrence.html#occNameString"><span class="hs-identifier hs-var">occNameString</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621680800816"><span class="hs-identifier hs-var">n_occ</span></a></span><span>
</span><span id="line-686"></span><span>
</span><span id="line-687"></span><span class="annot"><a href="GHC.Types.Name.html#nameSortStableString"><span class="hs-identifier hs-type">nameSortStableString</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#NameSort"><span class="hs-identifier hs-type">NameSort</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-688"></span><span id="nameSortStableString"><span class="annot"><span class="annottext">nameSortStableString :: NameSort -&gt; String
</span><a href="GHC.Types.Name.html#nameSortStableString"><span class="hs-identifier hs-var hs-var">nameSortStableString</span></a></span></span><span> </span><span class="annot"><span class="annottext">NameSort
</span><a href="GHC.Types.Name.html#System"><span class="hs-identifier hs-var">System</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;$_sys&quot;</span></span><span>
</span><span id="line-689"></span><span class="annot"><a href="GHC.Types.Name.html#nameSortStableString"><span class="hs-identifier hs-var">nameSortStableString</span></a></span><span> </span><span class="annot"><span class="annottext">NameSort
</span><a href="GHC.Types.Name.html#Internal"><span class="hs-identifier hs-var">Internal</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;$_in&quot;</span></span><span>
</span><span id="line-690"></span><span class="annot"><a href="GHC.Types.Name.html#nameSortStableString"><span class="hs-identifier hs-var">nameSortStableString</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.html#External"><span class="hs-identifier hs-type">External</span></a></span><span> </span><span id="local-6989586621680800811"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680800811"><span class="hs-identifier hs-var">mod</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Module -&gt; String
</span><a href="GHC.Unit.Module.html#moduleStableString"><span class="hs-identifier hs-var">moduleStableString</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680800811"><span class="hs-identifier hs-var">mod</span></a></span><span>
</span><span id="line-691"></span><span class="annot"><a href="GHC.Types.Name.html#nameSortStableString"><span class="hs-identifier hs-var">nameSortStableString</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.html#WiredIn"><span class="hs-identifier hs-type">WiredIn</span></a></span><span> </span><span id="local-6989586621680800809"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680800809"><span class="hs-identifier hs-var">mod</span></a></span></span><span> </span><span class="annot"><span class="annottext">TyThing
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">BuiltInSyntax
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Module -&gt; String
</span><a href="GHC.Unit.Module.html#moduleStableString"><span class="hs-identifier hs-var">moduleStableString</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621680800809"><span class="hs-identifier hs-var">mod</span></a></span><span>
</span><span id="line-692"></span><span>
</span><span id="line-693"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
\subsection{Overloaded functions related to Names}
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-700"></span><span>
</span><span id="line-701"></span><span class="hs-comment">-- | A class allowing convenient access to the 'Name' of various datatypes</span><span>
</span><span id="line-702"></span><span class="hs-keyword">class</span><span> </span><span id="NamedThing"><span class="annot"><a href="GHC.Types.Name.html#NamedThing"><span class="hs-identifier hs-var">NamedThing</span></a></span></span><span> </span><span id="local-6989586621680801392"><span class="annot"><a href="#local-6989586621680801392"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-703"></span><span>    </span><span id="getOccName"><span class="annot"><a href="GHC.Types.Name.html#getOccName"><span class="hs-identifier hs-type">getOccName</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621680801392"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#OccName"><span class="hs-identifier hs-type">OccName</span></a></span><span>
</span><span id="line-704"></span><span>    </span><span id="getName"><span class="annot"><a href="GHC.Types.Name.html#getName"><span class="hs-identifier hs-type">getName</span></a></span></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621680801392"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span>
</span><span id="line-705"></span><span>
</span><span id="line-706"></span><span>    </span><span id="local-6989586621680800806"><span class="annot"><a href="GHC.Types.Name.html#getOccName"><span class="hs-identifier hs-var hs-var">getOccName</span></a></span><span> </span><span id="local-6989586621680800804"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680800804"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; OccName
</span><a href="GHC.Types.Name.html#nameOccName"><span class="hs-identifier hs-var">nameOccName</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; Name
forall a. NamedThing a =&gt; a -&gt; Name
</span><a href="GHC.Types.Name.html#getName"><span class="hs-identifier hs-var">getName</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680800804"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span></span><span>      </span><span class="hs-comment">-- Default method</span><span>
</span><span id="line-707"></span><span>
</span><span id="line-708"></span><span id="local-6989586621680801323"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680800802"><span class="annot"><a href="GHC.Types.Name.html#NamedThing"><span class="hs-identifier hs-type">NamedThing</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680801323"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#NamedThing"><span class="hs-identifier hs-type">NamedThing</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680801323"><span class="hs-identifier hs-type">e</span></a></span><span class="hs-special">)</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-709"></span><span>    </span><span id="local-6989586621680800799"><span class="annot"><span class="annottext">getName :: Located e -&gt; Name
</span><a href="#local-6989586621680800799"><span class="hs-identifier hs-var hs-var hs-var hs-var">getName</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">e -&gt; Name
forall a. NamedThing a =&gt; a -&gt; Name
</span><a href="GHC.Types.Name.html#getName"><span class="hs-identifier hs-var">getName</span></a></span><span> </span><span class="annot"><span class="annottext">(e -&gt; Name) -&gt; (Located e -&gt; e) -&gt; Located e -&gt; Name
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Located e -&gt; e
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span></span><span>
</span><span id="line-710"></span><span>
</span><span id="line-711"></span><span id="local-6989586621680801319"><span class="annot"><a href="GHC.Types.Name.html#getSrcLoc"><span class="hs-identifier hs-type">getSrcLoc</span></a></span><span>           </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#NamedThing"><span class="hs-identifier hs-type">NamedThing</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680801319"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680801319"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#SrcLoc"><span class="hs-identifier hs-type">SrcLoc</span></a></span></span><span>
</span><span id="line-712"></span><span id="local-6989586621680801317"><span class="annot"><a href="GHC.Types.Name.html#getSrcSpan"><span class="hs-identifier hs-type">getSrcSpan</span></a></span><span>          </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#NamedThing"><span class="hs-identifier hs-type">NamedThing</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680801317"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680801317"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#SrcSpan"><span class="hs-identifier hs-type">SrcSpan</span></a></span></span><span>
</span><span id="line-713"></span><span id="local-6989586621680801315"><span class="annot"><a href="GHC.Types.Name.html#getOccString"><span class="hs-identifier hs-type">getOccString</span></a></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#NamedThing"><span class="hs-identifier hs-type">NamedThing</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680801315"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680801315"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span></span><span>
</span><span id="line-714"></span><span id="local-6989586621680801313"><span class="annot"><a href="GHC.Types.Name.html#getOccFS"><span class="hs-identifier hs-type">getOccFS</span></a></span><span>            </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#NamedThing"><span class="hs-identifier hs-type">NamedThing</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680801313"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680801313"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Data.FastString.html#FastString"><span class="hs-identifier hs-type">FastString</span></a></span></span><span>
</span><span id="line-715"></span><span>
</span><span id="line-716"></span><span id="getSrcLoc"><span class="annot"><span class="annottext">getSrcLoc :: forall a. NamedThing a =&gt; a -&gt; SrcLoc
</span><a href="GHC.Types.Name.html#getSrcLoc"><span class="hs-identifier hs-var hs-var">getSrcLoc</span></a></span></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; SrcLoc
</span><a href="GHC.Types.Name.html#nameSrcLoc"><span class="hs-identifier hs-var">nameSrcLoc</span></a></span><span>           </span><span class="annot"><span class="annottext">(Name -&gt; SrcLoc) -&gt; (a -&gt; Name) -&gt; a -&gt; SrcLoc
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Name
forall a. NamedThing a =&gt; a -&gt; Name
</span><a href="GHC.Types.Name.html#getName"><span class="hs-identifier hs-var">getName</span></a></span><span>
</span><span id="line-717"></span><span id="getSrcSpan"><span class="annot"><span class="annottext">getSrcSpan :: forall a. NamedThing a =&gt; a -&gt; SrcSpan
</span><a href="GHC.Types.Name.html#getSrcSpan"><span class="hs-identifier hs-var hs-var">getSrcSpan</span></a></span></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; SrcSpan
</span><a href="GHC.Types.Name.html#nameSrcSpan"><span class="hs-identifier hs-var">nameSrcSpan</span></a></span><span>          </span><span class="annot"><span class="annottext">(Name -&gt; SrcSpan) -&gt; (a -&gt; Name) -&gt; a -&gt; SrcSpan
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Name
forall a. NamedThing a =&gt; a -&gt; Name
</span><a href="GHC.Types.Name.html#getName"><span class="hs-identifier hs-var">getName</span></a></span><span>
</span><span id="line-718"></span><span id="getOccString"><span class="annot"><span class="annottext">getOccString :: forall a. NamedThing a =&gt; a -&gt; String
</span><a href="GHC.Types.Name.html#getOccString"><span class="hs-identifier hs-var hs-var">getOccString</span></a></span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OccName -&gt; String
</span><a href="GHC.Types.Name.Occurrence.html#occNameString"><span class="hs-identifier hs-var">occNameString</span></a></span><span>        </span><span class="annot"><span class="annottext">(OccName -&gt; String) -&gt; (a -&gt; OccName) -&gt; a -&gt; String
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; OccName
forall a. NamedThing a =&gt; a -&gt; OccName
</span><a href="GHC.Types.Name.html#getOccName"><span class="hs-identifier hs-var">getOccName</span></a></span><span>
</span><span id="line-719"></span><span id="getOccFS"><span class="annot"><span class="annottext">getOccFS :: forall a. NamedThing a =&gt; a -&gt; FastString
</span><a href="GHC.Types.Name.html#getOccFS"><span class="hs-identifier hs-var hs-var">getOccFS</span></a></span></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OccName -&gt; FastString
</span><a href="GHC.Types.Name.Occurrence.html#occNameFS"><span class="hs-identifier hs-var hs-var">occNameFS</span></a></span><span>            </span><span class="annot"><span class="annottext">(OccName -&gt; FastString) -&gt; (a -&gt; OccName) -&gt; a -&gt; FastString
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; OccName
forall a. NamedThing a =&gt; a -&gt; OccName
</span><a href="GHC.Types.Name.html#getOccName"><span class="hs-identifier hs-var">getOccName</span></a></span><span>
</span><span id="line-720"></span><span>
</span><span id="line-721"></span><span id="local-6989586621680801336"><span class="annot"><a href="GHC.Types.Name.html#pprInfixName"><span class="hs-identifier hs-type">pprInfixName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680801336"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#NamedThing"><span class="hs-identifier hs-type">NamedThing</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680801336"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680801336"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span></span><span>
</span><span id="line-722"></span><span class="hs-comment">-- See Outputable.pprPrefixVar, pprInfixVar;</span><span>
</span><span id="line-723"></span><span class="hs-comment">-- add parens or back-quotes as appropriate</span><span>
</span><span id="line-724"></span><span id="pprInfixName"><span class="annot"><span class="annottext">pprInfixName :: forall a. (Outputable a, NamedThing a) =&gt; a -&gt; SDoc
</span><a href="GHC.Types.Name.html#pprInfixName"><span class="hs-identifier hs-var hs-var">pprInfixName</span></a></span></span><span>  </span><span id="local-6989586621680800785"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680800785"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#pprInfixVar"><span class="hs-identifier hs-var">pprInfixVar</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OccName -&gt; Bool
</span><a href="GHC.Types.Name.Occurrence.html#isSymOcc"><span class="hs-identifier hs-var">isSymOcc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; OccName
forall a. NamedThing a =&gt; a -&gt; OccName
</span><a href="GHC.Types.Name.html#getOccName"><span class="hs-identifier hs-var">getOccName</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680800785"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680800785"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-725"></span><span>
</span><span id="line-726"></span><span id="local-6989586621680801335"><span class="annot"><a href="GHC.Types.Name.html#pprPrefixName"><span class="hs-identifier hs-type">pprPrefixName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#NamedThing"><span class="hs-identifier hs-type">NamedThing</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680801335"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680801335"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span></span><span>
</span><span id="line-727"></span><span id="pprPrefixName"><span class="annot"><span class="annottext">pprPrefixName :: forall a. NamedThing a =&gt; a -&gt; SDoc
</span><a href="GHC.Types.Name.html#pprPrefixName"><span class="hs-identifier hs-var hs-var">pprPrefixName</span></a></span></span><span> </span><span id="local-6989586621680800779"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680800779"><span class="hs-identifier hs-var">thing</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#pprPrefixVar"><span class="hs-identifier hs-var">pprPrefixVar</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OccName -&gt; Bool
</span><a href="GHC.Types.Name.Occurrence.html#isSymOcc"><span class="hs-identifier hs-var">isSymOcc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; OccName
</span><a href="GHC.Types.Name.html#nameOccName"><span class="hs-identifier hs-var">nameOccName</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680800777"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680800777"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-728"></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-729"></span><span>   </span><span id="local-6989586621680800777"><span class="annot"><span class="annottext">name :: Name
</span><a href="#local-6989586621680800777"><span class="hs-identifier hs-var hs-var">name</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Name
forall a. NamedThing a =&gt; a -&gt; Name
</span><a href="GHC.Types.Name.html#getName"><span class="hs-identifier hs-var">getName</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680800779"><span class="hs-identifier hs-var">thing</span></a></span><span>
</span><span id="line-730"></span></pre></body></html>